diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2017-01-31 10:27:14 +0300 |
---|---|---|
committer | Martin Pitt <martinpitt@users.noreply.github.com> | 2017-01-31 08:27:14 +0100 |
commit | ef1fd941f9e7c87809b28bbcd6d82f74ba4ed660 (patch) | |
tree | 124e9f238f1a04287bfe19019bfb2e2288a01e57 /src | |
parent | 70d940ec75143399b4065eeddcc20987cd7f4ad1 (diff) |
basic: check strdup result in khash_dup (#5176)
Fixes CID #1368249
Diffstat (limited to 'src')
-rw-r--r-- | src/basic/khash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/khash.c b/src/basic/khash.c index 9a2a3edb75..84648dc1c9 100644 --- a/src/basic/khash.c +++ b/src/basic/khash.c @@ -143,7 +143,7 @@ int khash_dup(khash *h, khash **ret) { copy->fd = -1; copy->algorithm = strdup(h->algorithm); - if (!copy) + if (!copy->algorithm) return -ENOMEM; copy->fd = accept4(h->fd, NULL, 0, SOCK_CLOEXEC); |