Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 May 2017 03:30:53 +0000 (UTC)
From:      Cy Schubert <cy@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r319178 - in stable: 10/usr.sbin/nscd 11/usr.sbin/nscd
Message-ID:  <201705300330.v4U3UrvN061772@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cy
Date: Tue May 30 03:30:53 2017
New Revision: 319178
URL: https://svnweb.freebsd.org/changeset/base/319178

Log:
  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@

Modified:
  stable/10/usr.sbin/nscd/query.c
Directory Properties:
  stable/10/   (props changed)

Changes in other areas also in this revision:
Modified:
  stable/11/usr.sbin/nscd/query.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/10/usr.sbin/nscd/query.c
==============================================================================
--- stable/10/usr.sbin/nscd/query.c	Tue May 30 03:27:59 2017	(r319177)
+++ stable/10/usr.sbin/nscd/query.c	Tue May 30 03:30:53 2017	(r319178)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705300330.v4U3UrvN061772>