Commit 4492af8432c70fe0b00cc5736f17590c29d79068

Stefan Sperling 2019-07-15T13:03:32

plug a memory leak in got-read-blob

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/libexec/got-read-blob/got-read-blob.c b/libexec/got-read-blob/got-read-blob.c
index 983478c..0e375fd 100644
--- a/libexec/got-read-blob/got-read-blob.c
+++ b/libexec/got-read-blob/got-read-blob.c
@@ -161,6 +161,7 @@ main(int argc, char *argv[])
 
 		err = got_privsep_send_blob(&ibuf, size, obj->hdrlen, buf);
 done:
+		free(buf);
 		if (f) {
 			if (fclose(f) != 0 && err == NULL)
 				err = got_error_from_errno("fclose");