]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Correct some mistkaes picked up by static analysis.
authorAdam Sutton <dev@adamsutton.me.uk>
Sun, 3 Feb 2013 13:22:21 +0000 (13:22 +0000)
committerAdam Sutton <dev@adamsutton.me.uk>
Sun, 3 Feb 2013 13:22:21 +0000 (13:22 +0000)
Thanks to seo for pointing these out.

src/cwc.c
src/dvb/dvb_adapter.c
src/main.c

index 58c1e08b944fb04b8f7262b8057684a17f702e7a..3c0b5ae93bb64c98678fe0e126aba8001e155be1 100644 (file)
--- a/src/cwc.c
+++ b/src/cwc.c
@@ -1857,7 +1857,8 @@ cwc_emm_cryptoworks(cwc_t *cwc, uint8_t *data, int len)
         cwc_send_msg(cwc, composed, elen + 12, 0, 1);
         free(composed);
         free(tmp);
-      }
+      } else if (tmp)
+        free(tmp);
       cwc->cwc_cryptoworks_emm.shared_emm = NULL;
       cwc->cwc_cryptoworks_emm.shared_len = 0;
     }
index e4b30c51c3f25e1f170e7580da099effcdaec892..861c111788e1c2425d1d964a216445fc0a5eeb74 100644 (file)
@@ -520,6 +520,7 @@ tda_add(int adapter_num)
   dirp = opendir(path);
   if (!dirp)
     return;
+  closedir(dirp);
 
   /* Check each frontend */
   // Note: this algo will fail if there are really exotic variations
index 4026121319b85aed0ad179318bdbcb105fa091a8..61cebd72b03f8e6c27e97648fa27efff5c3e0470 100644 (file)
@@ -283,6 +283,7 @@ show_usage
         }
         tok = strtok(NULL, "\n");
       }
+      free(desc);
     }
   }
   printf("\n");