Dereference null return value

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-10-20 11:57:02 +02:00
parent c837120231
commit 637d38f246
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -3489,8 +3489,10 @@ static int get_config_hooks(const char *key, char *retv, int inlen,
return -1; return -1;
subkey = strchr(subkey + 1, '.'); subkey = strchr(subkey + 1, '.');
if (!subkey)
return -1;
subkey++; subkey++;
if (!*subkey) if (*subkey == '\0')
return -1; return -1;
for (i = 0; i < NUM_LXC_HOOKS; i++) { for (i = 0; i < NUM_LXC_HOOKS; i++) {