Message ID | 20170208232325.15839-2-cus@passwd.hu |
---|---|
State | Accepted |
Commit | 4556dad2b7379a527134db519ab60111abefaf10 |
Headers | show |
On Thu, 9 Feb 2017, Marton Balint wrote: > Fixes Coverity CID 1396416. > > Signed-off-by: Marton Balint <cus@passwd.hu> > --- > libavdevice/iec61883.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c > index c45ae9a..721dca3 100644 > --- a/libavdevice/iec61883.c > +++ b/libavdevice/iec61883.c > @@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int length, > > packet->buf = av_malloc(length); > if (!packet->buf) { > + av_free(packet); > ret = -1; > goto exit; > } > -- Ping... Thanks, Marton
On Sun, 12 Feb 2017, Marton Balint wrote: > > On Thu, 9 Feb 2017, Marton Balint wrote: > >> Fixes Coverity CID 1396416. >> >> Signed-off-by: Marton Balint <cus@passwd.hu> >> --- >> libavdevice/iec61883.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c >> index c45ae9a..721dca3 100644 >> --- a/libavdevice/iec61883.c >> +++ b/libavdevice/iec61883.c >> @@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int > length, >> >> packet->buf = av_malloc(length); >> if (!packet->buf) { >> + av_free(packet); >> ret = -1; >> goto exit; >> } >> -- > > Ping... Seemed trivial enough, so pushed. Regards, Marton
diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c index c45ae9a..721dca3 100644 --- a/libavdevice/iec61883.c +++ b/libavdevice/iec61883.c @@ -120,6 +120,7 @@ static int iec61883_callback(unsigned char *data, int length, packet->buf = av_malloc(length); if (!packet->buf) { + av_free(packet); ret = -1; goto exit; }
Fixes Coverity CID 1396416. Signed-off-by: Marton Balint <cus@passwd.hu> --- libavdevice/iec61883.c | 1 + 1 file changed, 1 insertion(+)