Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit f849a82

Browse files
committed
[ CID 26001 ] Resource leak due to not returning the copied cstring.
1 parent 7d00dd2 commit f849a82

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

libscript/src/module-foreign.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ static bool __cstring_copy(void *from, void *to)
6565

6666
MCMemoryCopy(t_new_string, from, t_length);
6767

68+
*(char **)to = t_new_string;
69+
6870
return true;
6971
}
7072

0 commit comments

Comments
 (0)