From: Jim Meyering <jim@meyering.net>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH cluster 1/5] src/clulib/ckpt_state.c (ds_key_init_nt): detect failed malloc
Date: Tue, 23 Jun 2009 13:44:06 +0200 [thread overview]
Message-ID: <1245757450-13840-2-git-send-email-jim@meyering.net> (raw)
In-Reply-To: <1245757450-13840-1-git-send-email-jim@meyering.net>
From: Jim Meyering <meyering@redhat.com>
---
rgmanager/src/clulib/ckpt_state.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/clulib/ckpt_state.c b/rgmanager/src/clulib/ckpt_state.c
index fd85aee..766097b 100644
--- a/rgmanager/src/clulib/ckpt_state.c
+++ b/rgmanager/src/clulib/ckpt_state.c
@@ -70,6 +70,7 @@ ds_key_init_nt(char *keyid, int maxsize, int timeout)
}
newnode = malloc(sizeof(*newnode));
+ // FIXME: detect failed malloc
memset(newnode,0,sizeof(*newnode));
snprintf((char *)newnode->kn_cpname.value, SA_MAX_NAME_LENGTH-1,
"%s", keyid);
--
1.6.3.3.420.gd4b46
next prev parent reply other threads:[~2009-06-23 11:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-23 11:44 [Cluster-devel] [PATCH cluster 0/5] NULL-deref after failed malloc (STABLE3) Jim Meyering
2009-06-23 11:44 ` Jim Meyering [this message]
2009-06-23 11:44 ` [Cluster-devel] [PATCH cluster 2/5] dlm_controld: handle heap allocation failure and plug leaks Jim Meyering
2009-06-25 20:29 ` [Cluster-devel] " Jim Meyering
2009-06-23 11:44 ` [Cluster-devel] [PATCH cluster 3/5] dlm_controld: add comments: mark memory problems Jim Meyering
2009-06-23 11:44 ` [Cluster-devel] [PATCH cluster 4/5] dlm/tests: handle malloc failure Jim Meyering
2009-06-23 11:44 ` [Cluster-devel] [PATCH cluster 5/5] cman: handle malloc failure (i.e., don't deref NULL) Jim Meyering
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245757450-13840-2-git-send-email-jim@meyering.net \
--to=jim@meyering.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox