summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2017-05-30 03:30:53 +0000
committercy <cy@FreeBSD.org>2017-05-30 03:30:53 +0000
commit787d26a1a0c4bc3ec95386322ed245169ed07022 (patch)
tree3a5a9422181731e88cdc35c98db0b56afc9ace26 /usr.sbin
parent59c6c3b2412c908cf20321d2214546a0367caa10 (diff)
downloadFreeBSD-src-787d26a1a0c4bc3ec95386322ed245169ed07022.zip
FreeBSD-src-787d26a1a0c4bc3ec95386322ed245169ed07022.tar.gz
MFC r318588:
Fix up two assertions following malloc(). vangyzen@ notified me of the second one. The first one is fixed as well. Reported by: vangyzen@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/nscd/query.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/nscd/query.c b/usr.sbin/nscd/query.c
index a2b93d6..9b28082 100644
--- a/usr.sbin/nscd/query.c
+++ b/usr.sbin/nscd/query.c
@@ -725,7 +725,7 @@ on_read_request_process(struct query_state *qstate)
if (read_response->error_code == -2) {
read_response->data = malloc(
read_response->data_size);
- assert(read_response != NULL);
+ assert(read_response->data != NULL);
read_response->error_code = cache_read(c_entry,
read_request->cache_key,
read_request->cache_key_size,
@@ -745,7 +745,7 @@ on_read_request_process(struct query_state *qstate)
if (read_response->error_code == -2) {
read_response->data = malloc(
read_response->data_size);
- assert(read_response != NULL);
+ assert(read_response->data != NULL);
read_response->error_code = cache_read(neg_c_entry,
read_request->cache_key,
read_request->cache_key_size,
OpenPOWER on IntegriCloud