avformat/mpegtsenc: use the correct deallocation functions
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 7 Aug 2014 20:23:00 +0000 (22:23 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 7 Aug 2014 21:01:51 +0000 (23:01 +0200)
Found-by: Carl Eugen Hoyos <ce@hoyos.ws>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/mpegtsenc.c

index e4db9fc..5d98ea8 100644 (file)
@@ -534,9 +534,9 @@ static MpegTSService *mpegts_add_service(MpegTSWrite *ts, int sid,
     service->provider_name = av_strdup(provider_name);
     service->name          = av_strdup(name);
     if (!service->provider_name || !service->name) {
-        free(service->provider_name);
-        free(service->name);
-        free(service);
+        av_freep(&service->provider_name);
+        av_freep(&service->name);
+        av_free(service);
         return NULL;
     }
     dynarray_add(&ts->services, &ts->nb_services, service);