Skip to content

Commit e0a7240

Browse files
committed
Fix leak in truffleposix_get_user_home
1 parent d1a5635 commit e0a7240

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/c/truffleposix/truffleposix.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ char* truffleposix_get_user_home(const char *name) {
202202
return NULL;
203203
} else {
204204
/* ret == 0 && result == NULL means not found */
205+
free(buffer);
205206
return strdup("");
206207
}
207208
}

0 commit comments

Comments
 (0)