mirror of
https://github.com/mpv-player/mpv
synced 2024-12-28 10:02:17 +00:00
video_out: free memory if initializing a VO fails
This was a minor memory leak with no real impact.
This commit is contained in:
parent
9194c81070
commit
7236ad5ff2
@ -328,8 +328,10 @@ struct vo *init_best_video_out(struct MPOpts *opts,
|
|||||||
// continue...
|
// continue...
|
||||||
free(name);
|
free(name);
|
||||||
++vo_list;
|
++vo_list;
|
||||||
if (!(vo_list[0]))
|
if (!(vo_list[0])) {
|
||||||
|
talloc_free(vo);
|
||||||
return NULL; // do NOT fallback to others
|
return NULL; // do NOT fallback to others
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// now try the rest...
|
// now try the rest...
|
||||||
vo_subdevice = NULL;
|
vo_subdevice = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user