summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2012-07-13 18:38:52 +0200
committerAnand Avati <avati@redhat.com>2012-07-13 14:05:28 -0700
commita732e54aad9cff72097ff3020ef5c15ecd61b388 (patch)
treebc60afb4ab5fa7f310eaa284685b3812967d7b92
parent7820b2c1f88b207a8b1270b8c3cb3b797b7563d2 (diff)
gsyncd: don't dereference NULL upon failed realloc
Fix typo: s/buf/*buf/ in test for failed *buf = realloc... Spotted by coverity. Change-Id: Ie1db59956e331c3691f4ed470a3fbaf2bd2e2055 BUG: 789278 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3669 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
-rw-r--r--xlators/features/marker/utils/src/gsyncd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/marker/utils/src/gsyncd.c b/xlators/features/marker/utils/src/gsyncd.c
index 487eea1e557..3f4c2c4b38a 100644
--- a/xlators/features/marker/utils/src/gsyncd.c
+++ b/xlators/features/marker/utils/src/gsyncd.c
@@ -48,7 +48,7 @@ duplexpand (void **buf, size_t tsiz, size_t *len)
size_t osiz = tsiz * *len;
*buf = realloc (*buf, osiz << 1);
- if (!buf)
+ if (!*buf)
return -1;
memset ((char *)*buf + osiz, 0, osiz);