[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH cluster 3/5] dlm_controld: add comments: mark memory problems



From: Jim Meyering <meyering redhat com>

* group/dlm_controld/pacemaker.c (process_cluster): Mark additional
memory problems.
---
 group/dlm_controld/pacemaker.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/group/dlm_controld/pacemaker.c b/group/dlm_controld/pacemaker.c
index b9b38d0..b06e73d 100644
--- a/group/dlm_controld/pacemaker.c
+++ b/group/dlm_controld/pacemaker.c
@@ -191,6 +191,7 @@ void process_cluster(int ci)

 	log_debug("Decompressing message data");
 	uncompressed = malloc(new_size);
+	// FIXME: handle malloc failure
 	memset(uncompressed, 0, new_size);
 	
 	rc = BZ2_bzBuffToBuffDecompress(
@@ -212,6 +213,7 @@ void process_cluster(int ci)
     } else if(safe_str_eq("identify", data)) {
 	int pid = getpid();
 	char *pid_s = crm_itoa(pid);
+	// FIXME: can crm_itoa fail?  if so, does it return NULL?
 	send_ais_text(0, pid_s, TRUE, NULL, crm_msg_ais);
 	crm_free(pid_s);
 	goto done;
-- 
1.6.3.3.420.gd4b46


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]