From a143037fa37994270a3db7f7eb57f128c9f5b29a Mon Sep 17 00:00:00 2001 From: Thomas Graf Date: Sat, 21 Apr 2012 12:14:11 +0200 Subject: [PATCH] test-cache-mngr: Let the cache manager allocate the socket --- tests/test-cache-mngr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/test-cache-mngr.c b/tests/test-cache-mngr.c index 2c917da..528ae18 100644 --- a/tests/test-cache-mngr.c +++ b/tests/test-cache-mngr.c @@ -32,13 +32,11 @@ int main(int argc, char *argv[]) { struct nl_cache_mngr *mngr; struct nl_cache *lc, *nc, *ac, *rc; - struct nl_sock *sock; int err; signal(SIGINT, sigint); - sock = nl_cli_alloc_socket(); - err = nl_cache_mngr_alloc(sock, NETLINK_ROUTE, NL_AUTO_PROVIDE, &mngr); + err = nl_cache_mngr_alloc(NULL, NETLINK_ROUTE, NL_AUTO_PROVIDE, &mngr); if (err < 0) nl_cli_fatal(err, "Unable to allocate cache manager: %s", nl_geterror(err)); @@ -67,7 +65,6 @@ int main(int argc, char *argv[]) } nl_cache_mngr_free(mngr); - nl_socket_free(sock); return 0; }