From 710ec49bac8bce10bfc0b9ba4b34d877c22f7287 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Fri, 16 Mar 2012 12:40:16 +0000 Subject: daemon: Don't call reply_with_* after split_lines fails. split_lines already sets reply_with_*, so calling it again would lose protocol synchronization. --- daemon/blkid.c | 4 +--- daemon/md.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/daemon/blkid.c b/daemon/blkid.c index a6170dd9..7cc7889d 100644 --- a/daemon/blkid.c +++ b/daemon/blkid.c @@ -143,10 +143,8 @@ blkid_with_p_i_opt (const char *device) /* Split the command output into lines */ lines = split_lines (out); - if (lines == NULL) { - reply_with_perror ("malloc"); + if (lines == NULL) goto error; - } /* Parse the output of blkid -p -i -o export: * UUID=b6d83437-c6b4-4bf0-8381-ef3fc3578590 diff --git a/daemon/md.c b/daemon/md.c index 78e84f3e..265f4f4c 100644 --- a/daemon/md.c +++ b/daemon/md.c @@ -253,10 +253,8 @@ do_md_detail(const char *md) /* Split the command output into lines */ lines = split_lines (out); - if (lines == NULL) { - reply_with_perror ("malloc"); + if (lines == NULL) goto error; - } /* Parse the output of mdadm -D --export: * MD_LEVEL=raid1 -- cgit