commit ee40e50c72a4f863961c82498fe863c62ad4ba37
Author: Jim Meyering <meyering(a)redhat.com>
Date: Thu May 26 13:21:33 2011 +0200
dc-rhev-image.c: avoid NULL-deref upon OOM
* dc-rhev-image.c (apistart): Don't dereference NULL upon OOM.
dc-rhev-image.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/dc-rhev-image.c b/dc-rhev-image.c
index 1488468..84db216 100644
--- a/dc-rhev-image.c
+++ b/dc-rhev-image.c
@@ -840,7 +840,7 @@ static struct stor_dom *apistart(struct config *cfg)
if (!host)
goto err_alloc;
scheme = strndup(huri.scheme, huri.scheme_len);
- if (!host)
+ if (!scheme)
goto err_alloc;
if (strcmp(scheme, "http") == 0) {
Show replies by date