roken: Fix leak in new undump_not_file()

This commit is contained in:
Nicolas Williams
2022-12-30 16:38:07 -06:00
parent 73b42d3238
commit 319793b30b

View File

@@ -112,7 +112,7 @@ undump_not_file(int fd, char **out, size_t *size, int nul_terminate)
return 0; return 0;
} }
tmp = realloc(buf, bufsz + 1); *out = tmp = realloc(buf, bufsz + 1);
if (tmp == NULL) { if (tmp == NULL) {
free(buf); free(buf);
return ENOMEM; return ENOMEM;