get_content_by_content_name
diff --git a/nlsr.c b/nlsr.c
index a30c016..c9d4cf7 100644
--- a/nlsr.c
+++ b/nlsr.c
@@ -1204,10 +1204,11 @@
 	destroy_npt();
 	destroy_routing_table();
 
-	if ( nlsr->ccns != NULL )
-		ccns_close(&nlsr->ccns, NULL, NULL);
 	if ( nlsr->slice != NULL ) 
 		ccns_slice_destroy(&nlsr->slice);
+	if ( nlsr->ccns != NULL )
+		ccns_close(&nlsr->ccns, NULL, NULL);
+	
 
 	close(nlsr->nlsr_api_server_sock_fd);