]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http: nonce - fix memory leak (coverity)
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 19:22:33 +0000 (21:22 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 19:22:33 +0000 (21:22 +0200)
src/http.c

index 6a0ecabe3fbece481953f2528bfed60e01e78cba..2525ac4ff7c094d1c0585d78f90a2efc57ed6d44 100644 (file)
@@ -263,6 +263,7 @@ http_get_nonce(void)
     pthread_mutex_lock(&global_lock);
     if (RB_INSERT_SORTED(&http_nonces, n, link, http_nonce_cmp)) {
       pthread_mutex_unlock(&global_lock);
+      free(m);
       continue; /* get unique md5 */
     }
     mtimer_arm_rel(&n->expire, http_nonce_timeout, n, sec2mono(10));