diff options
author | John Ankarström <john@ankarstrom.se> | 2021-07-09 15:42:09 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-07-09 15:42:09 +0200 |
commit | a833f7029616579ecf0457ca98f5705b8f915fe0 (patch) | |
tree | 7023158e05fe758ac6669251992e08878db58e7c | |
parent | 72c344521267378fd82e675a7c2f40a9ae25287e (diff) | |
download | build-a833f7029616579ecf0457ca98f5705b8f915fe0.tar.gz |
Fix use after free
-rw-r--r-- | build.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -152,12 +152,13 @@ main(int argc, char *argv[]) "exist\n", argv[0], d); continue; } - free(d); if (sb.st_mtime > ssb.st_mtime) { d("%s: %s is modified, building\n", argv[i], d); + free(d); goto build; } + free(d); } uptodate: |