]> git.sur5r.net Git - i3/i3/blobdiff - src/cfgparse.y
properly free memory/close fd upon errors (Thanks xeen)
[i3/i3] / src / cfgparse.y
index c0bf92af556fee1b364373af01d7830321456e1f..5b2b4b5c7378308e08ca021a764ed1560a6d0108 100644 (file)
@@ -188,6 +188,7 @@ static char *migrate_config(char *input, off_t size) {
         ret = read(readpipe[0], converted + read_bytes, conv_size - read_bytes);
         if (ret == -1) {
             warn("Cannot read from pipe");
+            FREE(converted);
             return NULL;
         }
         read_bytes += ret;