diff options
-rw-r--r-- | src/remove.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/remove.c b/src/remove.c index c1a3c8f02..6ff47c97c 100644 --- a/src/remove.c +++ b/src/remove.c @@ -1151,7 +1151,10 @@ remove_dir (Dirstack_state *ds, char const *dir, struct cwd_state **cwd_state, free (empty_dir); if (AD_stack_height (ds) == 1) - break; + { + free_cwd (&AD_stack_top(ds)->u.saved_cwd); + break; + } } } |