From: Lars-Peter Clausen Date: Fri, 6 Jul 2012 21:23:29 +0000 (+0200) Subject: sr: session: Realloc correct array for pollfds in _sr_session_source_remove X-Git-Tag: dsupstream~872 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=93b03d091abb947fdf78e57f864313571fb903ab;p=libsigrok.git sr: session: Realloc correct array for pollfds in _sr_session_source_remove Commit 7149ad7c ("sr: session: Keep a global pollfd array") contained a small copy paste error. This patch fixes it. Signed-off-by: Lars-Peter Clausen --- diff --git a/session.c b/session.c index 9fc77659..69b3321b 100644 --- a/session.c +++ b/session.c @@ -605,7 +605,7 @@ static int _sr_session_source_remove(gintptr poll_object) (num_sources - old) * sizeof(struct source)); } - new_pollfds = g_try_realloc(sources, sizeof(GPollFD) * num_sources); + new_pollfds = g_try_realloc(pollfds, sizeof(GPollFD) * num_sources); if (!new_pollfds && num_sources > 0) { sr_err("session: %s: new_pollfds malloc failed", __func__); return SR_ERR_MALLOC;