From: Adam Sutton Date: Tue, 27 May 2014 09:06:39 +0000 (+0100) Subject: api: fix crash on passing on no subsystem X-Git-Tag: v4.1~2038 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b54989e6f1f51020a5526704da72d48aa4aea96;p=thirdparty%2Ftvheadend.git api: fix crash on passing on no subsystem --- diff --git a/src/api.c b/src/api.c index f88c20957..7af71828d 100644 --- a/src/api.c +++ b/src/api.c @@ -68,7 +68,7 @@ api_exec ( const char *subsystem, htsmsg_t *args, htsmsg_t **resp ) const char *op; /* Args and response must be set */ - if (!args || !resp) + if (!args || !resp || !subsystem) return EINVAL; // Note: there is no locking while checking the hook tree, its assumed