From c55efca05bc0b58b0845f83e73670f76030b82a5 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Fri, 1 Apr 2011 15:56:45 +0000 Subject: [PATCH] x11: fix memleak Signed-off-by: Michael Niedermayer --- libavdevice/x11grab.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c index 6a674ee6f9..64169ceeb0 100644 --- a/libavdevice/x11grab.c +++ b/libavdevice/x11grab.c @@ -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); dpy = XOpenDisplay(param); + av_freep(¶m); if(!dpy) { av_log(s1, AV_LOG_ERROR, "Could not open X display.\n"); return AVERROR(EIO);