Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 1/2] Covscan Scan: Wrong Check of Return Value
@ 2023-01-04 17:08 Steve Dickson
  2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
  2023-01-11 15:56 ` [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
  0 siblings, 2 replies; 4+ messages in thread
From: Steve Dickson @ 2023-01-04 17:08 UTC (permalink / raw)
  To: Linux NFS Mailing list

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2151966
Signed-off-by: Steve Dickson <steved@redhat.com>
---
 support/export/client.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/support/export/client.c b/support/export/client.c
index ea4f89d..79164fe 100644
--- a/support/export/client.c
+++ b/support/export/client.c
@@ -699,6 +699,9 @@ check_netgroup(const nfs_client *clp, const struct addrinfo *ai)
 
 	/* check whether the IP itself is in the netgroup */
 	ip = calloc(INET6_ADDRSTRLEN, 1);
+	if (ip == NULL)
+		goto out;
+
 	if (inet_ntop(ai->ai_family, &(((struct sockaddr_in *)ai->ai_addr)->sin_addr), ip, INET6_ADDRSTRLEN) == ip) {
 		if (innetgr(netgroup, ip, NULL, NULL)) {
 			free(hname);
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-01-11 15:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-04 17:08 [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson
2023-01-04 17:08 ` [PATCH 2/2] Covscan Scan: Fixed a couple CLANG_WARNINGs Steve Dickson
2023-01-11 15:57   ` Steve Dickson
2023-01-11 15:56 ` [PATCH 1/2] Covscan Scan: Wrong Check of Return Value Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox