ui/ncurses: Fix discover_client leak
authorJeremy Kerr <jk@ozlabs.org>
Thu, 13 Mar 2014 05:28:00 +0000 (13:28 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Thu, 10 Apr 2014 03:18:25 +0000 (11:18 +0800)
We're not freeing the discover_client on exit, as it's not attached to
any existing talloc context.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
ui/ncurses/nc-cui.c

index 3a898692cd71f2854f4e3046a35c0317c76a4588..18604c9e04a06a2435f956a6b1b89bc897d05986 100644 (file)
@@ -677,6 +677,7 @@ retry_start:
        }
 
        atexit(cui_atexit);
        }
 
        atexit(cui_atexit);
+       talloc_steal(cui, cui->client);
        cui_start();
 
        waiter_register_io(cui->waitset, STDIN_FILENO, WAIT_IN,
        cui_start();
 
        waiter_register_io(cui->waitset, STDIN_FILENO, WAIT_IN,