screenshooter: Free allocated memory where missing from some return paths
This commit is contained in:
committed by
Kristian Høgsberg
parent
fe4eacf6ad
commit
e6675c28b5
@@ -417,6 +417,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
weston_log("unknown recorder format\n");
|
weston_log("unknown recorder format\n");
|
||||||
|
free(recorder);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -425,6 +426,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
|
|||||||
|
|
||||||
if (recorder->fd < 0) {
|
if (recorder->fd < 0) {
|
||||||
weston_log("problem opening output file %s: %m\n", filename);
|
weston_log("problem opening output file %s: %m\n", filename);
|
||||||
|
free(recorder);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user