The jump to the path_buffer free must be taken when batman-adv was not loaded
because it has to free path_buff which was allocated earlier

Signed-off-by: Sven Eckelmann <[email protected]>
---
 sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys.c b/sys.c
index 2fcd67b..7539f76 100644
--- a/sys.c
+++ b/sys.c
@@ -230,7 +230,7 @@ int interface(char *mesh_iface, int argc, char **argv)
 
                        if (!file_exists(module_ver_path)) {
                                fprintf(stderr, "Error - batman-adv module has 
not been loaded\n");
-                               goto err;
+                               goto err_buff;
                        }
 
                        fprintf(stderr, "Error - interface type not supported 
by batman-adv: %s\n", argv[i]);
-- 
1.8.4.rc3

Reply via email to