diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2012-05-20 15:07:57 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-05-20 15:12:33 -0700 |
commit | 7eb29aeec6f75f482d9ea3b2f94eb6899b830c60 (patch) | |
tree | d5d638a7a3299ba8e88a9138989cba47e8642b50 /src/include | |
parent | c7daf7a44c9a2e2743d94cf03b626d601f9c3015 (diff) | |
download | ceph-7eb29aeec6f75f482d9ea3b2f94eb6899b830c60.tar.gz |
check malloc return values
There were a few places where we didn't check malloc return code.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/addr_parsing.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/addr_parsing.c b/src/include/addr_parsing.c index 38f1ca9527a..c8c0f86a008 100644 --- a/src/include/addr_parsing.c +++ b/src/include/addr_parsing.c @@ -55,6 +55,8 @@ char *resolve_addrs(const char *orig_str) len = BUF_SIZE; new_str = (char *)malloc(len); + if (!new_str) + return NULL; pos = 0; |