projects
/
platform
/
upstream
/
connman.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed various memory leaks
[platform/upstream/connman.git]
/
src
/
service.c
diff --git
a/src/service.c
b/src/service.c
index
b042461
..
cf8ccaa
100755
(executable)
--- a/
src/service.c
+++ b/
src/service.c
@@
-786,11
+786,17
@@
static int service_load(struct connman_service *service)
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv4method", NULL);
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv4method", NULL);
- service->dns_config_method_ipv4 = __connman_dnsconfig_string2method(dns_method);
+ if (dns_method) {
+ service->dns_config_method_ipv4 = __connman_dnsconfig_string2method(dns_method);
+ g_free(dns_method);
+ }
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv6method", NULL);
dns_method = g_key_file_get_string(keyfile, service->identifier,
"Nameservers.IPv6method", NULL);
- service->dns_config_method_ipv6 = __connman_dnsconfig_string2method(dns_method);
+ if (dns_method) {
+ service->dns_config_method_ipv6 = __connman_dnsconfig_string2method(dns_method);
+ g_free(dns_method);
+ }
#endif
service->timeservers_config = g_key_file_get_string_list(keyfile,
#endif
service->timeservers_config = g_key_file_get_string_list(keyfile,