]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
idnode: fix the critical access-after-free in api_idnode_handler()
authorJaroslav Kysela <perex@perex.cz>
Tue, 16 May 2017 08:50:08 +0000 (10:50 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 May 2017 09:13:31 +0000 (11:13 +0200)
src/api/api_idnode.c

index 297069f3e6d0a7310f1d518162fdd548c6273988..0890f902be296afa395ec6cb2822c6e09e09f4f0 100644 (file)
@@ -670,7 +670,8 @@ api_idnode_handler
         err = EPERM;
       } else {
         handler(perm, in);
-        idnode_perm_unset(in);
+        if (!destroyed)
+          idnode_perm_unset(in);
       }
       htsmsg_destroy(msg);
     }