summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--program.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/program.c b/program.c
index f347a35..abd525a 100644
--- a/program.c
+++ b/program.c
@@ -587,8 +587,11 @@ read_sourceinfo(uc_source_t *input, uint32_t flags, char **errp, uc_program_t *p
return NULL;
}
- if (!read_size_t(input->fp, &len, sizeof(uint32_t), "sourceinfo code buffer length", errp))
+ if (!read_size_t(input->fp, &len, sizeof(uint32_t), "sourceinfo code buffer length", errp)) {
+ free(path);
+
return NULL;
+ }
if (len > 0) {
code = xalloc(len);