From 04bd9386fe93d596ca0af7a9895598b709088484 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 27 Nov 2015 10:40:28 -0500 Subject: [PATCH] Fix swaygrab memory leak --- swaygrab/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/swaygrab/main.c b/swaygrab/main.c index 1edda490..c05f62cd 100644 --- a/swaygrab/main.c +++ b/swaygrab/main.c @@ -43,6 +43,8 @@ void grab_and_apply_magick(const char *file, const char *output, int socketfd) { fwrite(pixels, 1, len, f); fflush(f); fclose(f); + free(pixels); + free(cmd); } int main(int argc, char **argv) {