mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 16:39:49 +00:00
stream_dvb: fix minor resource leaks
Fixes CID 1350062 and 1350061. Just for the sake of shutting up Coverity.
This commit is contained in:
parent
8e4eee9a9a
commit
337ad4fef4
@ -1101,6 +1101,7 @@ dvb_state_t *dvb_get_state(stream_t *stream)
|
|||||||
if (tmp == NULL) {
|
if (tmp == NULL) {
|
||||||
mp_err(log, "DVB_CONFIG, can't realloc %d bytes, skipping\n",
|
mp_err(log, "DVB_CONFIG, can't realloc %d bytes, skipping\n",
|
||||||
size);
|
size);
|
||||||
|
free(list);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
cards = tmp;
|
cards = tmp;
|
||||||
@ -1108,6 +1109,8 @@ dvb_state_t *dvb_get_state(stream_t *stream)
|
|||||||
name = malloc(20);
|
name = malloc(20);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
mp_err(log, "DVB_CONFIG, can't realloc 20 bytes, skipping\n");
|
mp_err(log, "DVB_CONFIG, can't realloc 20 bytes, skipping\n");
|
||||||
|
free(list);
|
||||||
|
free(tmp);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user