summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/toxic/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/testing/toxic/main.c b/testing/toxic/main.c
index 27a34e09..fd3c732f 100644
--- a/testing/toxic/main.c
+++ b/testing/toxic/main.c
@@ -308,10 +308,13 @@ static int store_data(char *path)
308 308
309 fd = fopen(path, "w"); 309 fd = fopen(path, "w");
310 if (fd == NULL) { 310 if (fd == NULL) {
311 free(buf);
311 return 2; 312 return 2;
312 } 313 }
313 314
314 if (fwrite(buf, len, 1, fd) != 1) { 315 if (fwrite(buf, len, 1, fd) != 1) {
316 free(buf);
317 fclose(fd);
315 return 3; 318 return 3;
316 } 319 }
317 320