x11: fix memleak
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
05c062e9da
commit
c55efca05b
@ -105,6 +105,7 @@ x11grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
|
|||||||
av_log(s1, AV_LOG_INFO, "device: %s -> display: %s x: %d y: %d width: %d height: %d\n", s1->filename, param, x_off, y_off, ap->width, ap->height);
|
av_log(s1, AV_LOG_INFO, "device: %s -> display: %s x: %d y: %d width: %d height: %d\n", s1->filename, param, x_off, y_off, ap->width, ap->height);
|
||||||
|
|
||||||
dpy = XOpenDisplay(param);
|
dpy = XOpenDisplay(param);
|
||||||
|
av_freep(¶m);
|
||||||
if(!dpy) {
|
if(!dpy) {
|
||||||
av_log(s1, AV_LOG_ERROR, "Could not open X display.\n");
|
av_log(s1, AV_LOG_ERROR, "Could not open X display.\n");
|
||||||
return AVERROR(EIO);
|
return AVERROR(EIO);
|
||||||
|
Loading…
Reference in New Issue
Block a user