From 2897735523dd05a4ef21d25d3d99fa7fa0b24b44 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Sun, 11 Aug 2019 02:11:02 +0000 Subject: libmach: plug another memory leak Change-Id: Ia5c888db1f0ded2aa92238d994239e46bf52667a --- src/libmach/crack.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libmach/crack.c b/src/libmach/crack.c index 6d167404..5695b7eb 100644 --- a/src/libmach/crack.c +++ b/src/libmach/crack.c @@ -69,6 +69,7 @@ crackhdr(char *name, int mode) return hdr; } werrstr("unknown file type: %r"); + free(hdr->filename); free(hdr); close(fd); return nil; @@ -89,6 +90,7 @@ uncrackhdr(Fhdr *hdr) for(i=0; inthread; i++) free(hdr->thread[i].ureg); free(hdr->thread); + free(hdr->filename); free(hdr); } -- cgit v1.2.3