From: Daniel Stone Date: Mon, 4 Jun 2012 15:16:20 +0000 (+0100) Subject: Fix tiny memory leak in dump test X-Git-Tag: xkbcommon-0.2.0~512 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=77c909dee2edbef2e96f95887a6abd96b985df6f;p=platform%2Fupstream%2Flibxkbcommon.git Fix tiny memory leak in dump test We forgot to free the path we'd allocated with asprintf. Signed-off-by: Daniel Stone --- diff --git a/test/dump.c b/test/dump.c index bd6d1ab..16d1768 100644 --- a/test/dump.c +++ b/test/dump.c @@ -58,6 +58,7 @@ int main(int argc, char *argv[]) assert(fd >= 0); assert(stat(path, &stat_buf) == 0); assert(stat_buf.st_size > 0); + free(path); expected = mmap(NULL, stat_buf.st_size, PROT_READ, MAP_SHARED, fd, 0); assert(expected != MAP_FAILED);