ensure vty code uses talloc_strdup() rather than regular strdup
diff --git a/openbsc/src/vty/command.c b/openbsc/src/vty/command.c
index fa21147..6173292 100644
--- a/openbsc/src/vty/command.c
+++ b/openbsc/src/vty/command.c
@@ -1803,16 +1803,9 @@
 				descvec = vector_slot(strvec, index);
 				for (j = 0; j < vector_active(descvec); j++)
 					if ((desc = vector_slot(descvec, j))) {
-						if ((string =
-						     cmd_entry_function
-						     (vector_slot(vline, index),
-						      desc->cmd)))
-							if (cmd_unique_string
-							    (matchvec, string))
-								vector_set
-								    (matchvec,
-								     strdup
-								     (string));
+						if ((string = cmd_entry_function(vector_slot(vline, index), desc->cmd)))
+							if (cmd_unique_string (matchvec, string))
+								vector_set (matchvec, talloc_strdup(tall_vty_ctx, string));
 					}
 			}
 		}
@@ -2661,7 +2654,7 @@
 	if (host.name)
 		talloc_free(host.name);
 
-	host.name = strdup(argv[0]);
+	host.name = talloc_strdup(tall_vty_ctx, argv[0]);
 	return CMD_SUCCESS;
 }
 
@@ -2696,7 +2689,7 @@
 			host.password = NULL;
 			if (host.password_encrypt)
 				talloc_free(host.password_encrypt);
-			host.password_encrypt = strdup(strdup(argv[1]));
+			host.password_encrypt = talloc_strdup(tall_vty_ctx, argv[1]);
 			return CMD_SUCCESS;
 		} else {
 			vty_out(vty, "Unknown encryption type.%s", VTY_NEWLINE);
@@ -2719,10 +2712,10 @@
 	if (host.encrypt) {
 		if (host.password_encrypt)
 			talloc_free(host.password_encrypt);
-		host.password_encrypt = strdup(zencrypt(argv[0]));
+		host.password_encrypt = talloc_strdup(tall_vty_ctx, zencrypt(argv[0]));
 	} else
 #endif
-		host.password = strdup(argv[0]);
+		host.password = talloc_strdup(tall_vty_ctx, argv[0]);
 
 	return CMD_SUCCESS;
 }
@@ -2755,7 +2748,7 @@
 
 			if (host.enable_encrypt)
 				talloc_free(host.enable_encrypt);
-			host.enable_encrypt = strdup(argv[1]);
+			host.enable_encrypt = talloc_strdup(tall_vty_ctx, argv[1]);
 
 			return CMD_SUCCESS;
 		} else {
@@ -2780,10 +2773,10 @@
 	if (host.encrypt) {
 		if (host.enable_encrypt)
 			talloc_free(host.enable_encrypt);
-		host.enable_encrypt = strdup(zencrypt(argv[0]));
+		host.enable_encrypt = talloc_strdup(tall_vty_ctx, zencrypt(argv[0]));
 	} else
 #endif
-		host.enable = strdup(argv[0]);
+		host.enable = talloc_strdup(tall_vty_ctx, argv[0]);
 
 	return CMD_SUCCESS;
 }
@@ -2827,12 +2820,12 @@
 	if (host.password) {
 		if (host.password_encrypt)
 			talloc_free(host.password_encrypt);
-		host.password_encrypt = strdup(zencrypt(host.password));
+		host.password_encrypt = talloc_strdup(tall_vty_ctx, zencrypt(host.password));
 	}
 	if (host.enable) {
 		if (host.enable_encrypt)
 			talloc_free(host.enable_encrypt);
-		host.enable_encrypt = strdup(zencrypt(host.enable));
+		host.enable_encrypt = talloc_strdup(tall_vty_ctx, zencrypt(host.enable));
 	}
 
 	return CMD_SUCCESS;
@@ -3106,7 +3099,7 @@
 	if (host.logfile)
 		talloc_free(host.logfile);
 
-	host.logfile = strdup(fname);
+	host.logfile = talloc_strdup(tall_vty_ctx, fname);
 
 	return CMD_SUCCESS;
 }
@@ -3296,7 +3289,7 @@
 {
 	if (host.motdfile)
 		talloc_free(host.motdfile);
-	host.motdfile = strdup(argv[0]);
+	host.motdfile = talloc_strdup(tall_vty_ctx, argv[0]);
 
 	return CMD_SUCCESS;
 }
@@ -3324,7 +3317,7 @@
 /* Set config filename.  Called from vty.c */
 void host_config_set(char *filename)
 {
-	host.config = strdup(filename);
+	host.config = talloc_strdup(tall_vty_ctx, filename);
 }
 
 void install_default(enum node_type node)