summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2011-03-23 08:21:01 -0400
committerStephen Gallagher <sgallagh@redhat.com>2011-03-23 08:22:57 -0400
commitc2b9bc204f1ed8d1fdeea317fe650ae30c142524 (patch)
treed4e48964fb4cede1ca1778ad527dcf52e97f326d
parent0bf9e80f52edcd04023551d81c69e3a39584740c (diff)
downloadding-libs2-c2b9bc204f1ed8d1fdeea317fe650ae30c142524.tar.gz
ding-libs2-c2b9bc204f1ed8d1fdeea317fe650ae30c142524.tar.xz
ding-libs2-c2b9bc204f1ed8d1fdeea317fe650ae30c142524.zip
Fix incorrect allocation check
-rw-r--r--ini/ini_comment.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ini/ini_comment.c b/ini/ini_comment.c
index 30d21b2..bd22575 100644
--- a/ini/ini_comment.c
+++ b/ini/ini_comment.c
@@ -245,7 +245,7 @@ static int ini_comment_modify(struct ini_comment *ic,
/* Fill in empty lines */
for (i = 0; i < (idx-len); i++) {
empty = strdup("");
- if (empty) {
+ if (!empty) {
TRACE_ERROR_NUMBER("Memory problem", ENOMEM);
return ENOMEM;
}