libdvbv5: fix error condition on ATSC service location descriptor
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 28 Nov 2013 11:51:59 +0000 (09:51 -0200)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 28 Nov 2013 11:51:59 +0000 (09:51 -0200)
It should return if an error occur.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
lib/libdvbv5/descriptors/desc_atsc_service_location.c

index 086cf1b..5779ff0 100644 (file)
@@ -39,8 +39,10 @@ void atsc_desc_service_location_init(struct dvb_v5_fe_parms *parms,
 
        if (s_loc->number_elements) {
                s_loc->elementary = malloc(s_loc->number_elements * sizeof(*s_loc->elementary));
-               if (!s_loc->elementary)
+               if (!s_loc->elementary) {
                        dvb_perror("Can't allocate space for ATSC service location elementary data");
+                       return;
+               }
 
                el = s_loc->elementary;