From a93964ce11ac01fe2e23a4e77a8ccfb507bdef8f Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 23 Dec 2011 11:54:08 +0100 Subject: [PATCH] * grub-core/net/net.c (grub_cmd_delroute): Add missing out condition. --- ChangeLog | 4 ++++ grub-core/net/net.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index d76f07ac4..3c2966134 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-12-23 Vladimir Serbinenko + + * grub-core/net/net.c (grub_cmd_delroute): Add missing out condition. + 2011-12-23 Seth Goldberg * grub-core/Makefile.core.def (lzma_decompress): Add missing diff --git a/grub-core/net/net.c b/grub-core/net/net.c index d64206432..347a95afd 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -934,6 +934,8 @@ grub_cmd_delroute (struct grub_command *cmd __attribute__ ((unused)), *prev = route->next; grub_free (route->name); grub_free (route); + if (!*prev) + break; } return GRUB_ERR_NONE;