summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/network.c')
-rw-r--r--mdk-stage1/network.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c
index 9030fbbde..29455e5bc 100644
--- a/mdk-stage1/network.c
+++ b/mdk-stage1/network.c
@@ -538,7 +538,7 @@ static enum return_type configure_network(struct interface_info * intf)
char * boulet;
if (dhcp_hostname || dhcp_domain) {
- answers = (char **) malloc(sizeof(questions));
+ answers = (char **) calloc(1, sizeof(questions));
answers[0] = strdup(dhcp_hostname);
answers[1] = strdup(dhcp_domain);
}
@@ -1006,7 +1006,7 @@ enum return_type ftp_prepare(void)
if (!IS_AUTOMATIC) {
if (answers == NULL)
- answers = (char **) malloc(sizeof(questions));
+ answers = (char **) calloc(1, sizeof(questions));
results = choose_mirror_from_list(http_proxy_host, http_proxy_port, "ftp", &answers[0], &answers[1]);
@@ -1159,7 +1159,7 @@ enum return_type http_prepare(void)
if (!IS_AUTOMATIC) {
if (answers == NULL)
- answers = (char **) malloc(sizeof(questions));
+ answers = (char **) calloc(1, sizeof(questions));
results = choose_mirror_from_list(http_proxy_host, http_proxy_port, "http", &answers[0], &answers[1]);