]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
satip: coverity fixes
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 19:20:23 +0000 (21:20 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 19:20:23 +0000 (21:20 +0200)
src/input/mpegts/satip/satip.c

index 2f7cbba310d009f63ccb7b90311dd924b9b96390..694a318dc66487a8b91c3488e6603be924d509d2 100644 (file)
@@ -385,7 +385,7 @@ satip_device_create( satip_device_info_t *info )
 
   if (!tvh_hardware_create0((tvh_hardware_t*)sd, &satip_device_class,
                             uuid.hex, conf)) {
-    free(sd);
+    /* Note: sd is freed in above fcn */
     return NULL;
   }
 
@@ -882,9 +882,9 @@ satip_discovery_service_received
   /* Sanity checks */
   if (st == NULL || strcmp(st, "urn:ses-com:device:SatIPServer:1"))
     return;
-  if (uuid == NULL && strlen(uuid) < 16)
+  if (uuid == NULL || strlen(uuid) < 16)
     return;
-  if (location == NULL && strncmp(location, "http://", 7))
+  if (location == NULL || strncmp(location, "http://", 7))
     return;
   if (bootid == NULL || configid == NULL || server == NULL)
     return;