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 <lars@metafoo.de>
This commit is contained in:
parent
e7d087bf0e
commit
93b03d091a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue