hush: fix recent breakage (VAR=VAL stopped working)
authorDenis Vlasenko <vda.linux@googlemail.com>
Thu, 10 May 2007 23:05:28 +0000 (23:05 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Thu, 10 May 2007 23:05:28 +0000 (23:05 -0000)
shell/hush.c

index 7afcfbda13b717f166b8095626391a215a4c0b5f..8ffb117deb04b9ae193e6792219424d0966883ca 100644 (file)
@@ -2420,7 +2420,7 @@ static int set_local_var(const char *s, int flg_export)
                        result = -1;
                } else {
                        cur->name = strdup(name);
-                       if (cur->name) {
+                       if (!cur->name) {
                                free(cur);
                                result = -1;
                        } else {