Mercurial > masqmail
comparison src/conf.c @ 412:8a62bebda631
Fixed segfault, caused by a stupid g_strchug/g_strstrip implementation.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Wed, 29 Feb 2012 13:33:40 +0100 |
parents | 9b93c0a3bd8c |
children | f37384470855 |
comparison
equal
deleted
inserted
replaced
411:9b93c0a3bd8c | 412:8a62bebda631 |
---|---|
219 *cp = '\0'; | 219 *cp = '\0'; |
220 } | 220 } |
221 g_strstrip(line); | 221 g_strstrip(line); |
222 iface->address = g_strdup(line); | 222 iface->address = g_strdup(line); |
223 iface->port = (cp) ? atoi(++cp) : def_port; | 223 iface->port = (cp) ? atoi(++cp) : def_port; |
224 DEBUG(9) fprintf(stderr,"found: address:port=%s:%u\n", | 224 DEBUG(9) fprintf(stderr, "found: address:port=%s:%u\n", |
225 iface->address, iface->port); | 225 iface->address, iface->port); |
226 return iface; | 226 return iface; |
227 } | 227 } |
228 | 228 |
229 static gboolean | 229 static gboolean |
560 free(shortname); | 560 free(shortname); |
561 free(local_hosts_str); | 561 free(local_hosts_str); |
562 } | 562 } |
563 if (!listen_addrs_tmp) { | 563 if (!listen_addrs_tmp) { |
564 conf.listen_addresses = g_list_append(NULL, | 564 conf.listen_addresses = g_list_append(NULL, |
565 parse_interface("localhost", 25)); | 565 parse_interface(strdup("localhost"), 25)); |
566 } else { | 566 } else { |
567 GList *node; | 567 GList *node; |
568 | 568 |
569 foreach(listen_addrs_tmp, node) { | 569 foreach(listen_addrs_tmp, node) { |
570 conf.listen_addresses = | 570 conf.listen_addresses = |