summaryrefslogtreecommitdiff
path: root/src/screenshooter.c
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2013-01-10 19:48:52 +0000
committerKristian Høgsberg <krh@bitplanet.net>2013-01-10 16:06:51 -0500
commite6675c28b5822ed78937cdeeb76fb9dbbdafbc90 (patch)
tree6cf86afcee9349ed5e8819fc6d0cdbec7f7d8aa7 /src/screenshooter.c
parentfe4eacf6ad9110099285cfa8842957588d4b7d9d (diff)
downloadweston-e6675c28b5822ed78937cdeeb76fb9dbbdafbc90.tar.gz
screenshooter: Free allocated memory where missing from some return paths
Diffstat (limited to 'src/screenshooter.c')
-rw-r--r--src/screenshooter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/screenshooter.c b/src/screenshooter.c
index 4f6599f9..c8da3763 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -417,6 +417,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
break;
default:
weston_log("unknown recorder format\n");
+ free(recorder);
return;
}
@@ -425,6 +426,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
if (recorder->fd < 0) {
weston_log("problem opening output file %s: %m\n", filename);
+ free(recorder);
return;
}