summaryrefslogtreecommitdiffstats
path: root/fastboot/fastboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/fastboot.c')
-rw-r--r--fastboot/fastboot.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fastboot/fastboot.c b/fastboot/fastboot.c
index 70b838f..da2af41 100644
--- a/fastboot/fastboot.c
+++ b/fastboot/fastboot.c
@@ -449,7 +449,13 @@ static int setup_requirement_line(char *name)
for(n = 0; n < count; n++) {
out[n] = strdup(strip(val[n]));
- if (out[n] == 0) return -1;
+ if (out[n] == 0) {
+ for(size_t i = 0; i < n; ++i) {
+ free((char*) out[i]);
+ }
+ free(out);
+ return -1;
+ }
}
fb_queue_require(prod, name, invert, n, out);