ash: popstackmark is reported trying to pop until NULL
authorDenis Vlasenko <vda.linux@googlemail.com>
Tue, 13 Mar 2007 20:55:36 +0000 (20:55 -0000)
committerDenis Vlasenko <vda.linux@googlemail.com>
Tue, 13 Mar 2007 20:55:36 +0000 (20:55 -0000)
is seen (which isn't possible), prevent this.

shell/ash.c

index bfa4a8c6d6708d277b119286809aefdd06d8fe47..29156c199366b5dbdf053d342a6b77a5054a892b 100644 (file)
@@ -1216,6 +1216,9 @@ popstackmark(struct stackmark *mark)
 {
        struct stack_block *sp;
 
+       if (!mark->stackp)
+               return;
+
        INT_OFF;
        markp = mark->marknext;
        while (stackp != mark->stackp) {