diff options
author | Jeremy Allison <jra@samba.org> | 2011-11-23 11:59:53 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2011-11-23 22:38:13 +0100 |
commit | 9c4fdde023ff156e61d11429cfbd388db708ca42 (patch) | |
tree | 1a67bb439ab51b8fea2a6e65544fe4c6de1449c2 /lib/addns | |
parent | b1f7164aa86789a2cdca4ccbe9395abfda0751cb (diff) | |
download | samba-9c4fdde023ff156e61d11429cfbd388db708ca42.tar.gz samba-9c4fdde023ff156e61d11429cfbd388db708ca42.tar.bz2 samba-9c4fdde023ff156e61d11429cfbd388db708ca42.zip |
Fix uninitialized variable frees on error paths.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Nov 23 22:38:13 CET 2011 on sn-devel-104
Diffstat (limited to 'lib/addns')
-rw-r--r-- | lib/addns/dnsrecord.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c index f9435da544..e5a43b887c 100644 --- a/lib/addns/dnsrecord.c +++ b/lib/addns/dnsrecord.c @@ -27,8 +27,8 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, uint16 q_type, uint16 q_class, struct dns_request **preq ) { - struct dns_request *req; - struct dns_question *q; + struct dns_request *req = NULL; + struct dns_question *q = NULL; DNS_ERROR err; if (!(req = talloc_zero(mem_ctx, struct dns_request)) || @@ -60,8 +60,8 @@ DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name, DNS_ERROR dns_create_update( TALLOC_CTX *mem_ctx, const char *name, struct dns_update_request **preq ) { - struct dns_update_request *req; - struct dns_zone *z; + struct dns_update_request *req = NULL; + struct dns_zone *z = NULL; DNS_ERROR err; if (!(req = talloc_zero(mem_ctx, struct dns_update_request)) || @@ -95,7 +95,7 @@ DNS_ERROR dns_create_rrec(TALLOC_CTX *mem_ctx, const char *name, uint16 data_length, uint8 *data, struct dns_rrec **prec) { - struct dns_rrec *rec; + struct dns_rrec *rec = NULL; DNS_ERROR err; if (!(rec = talloc(mem_ctx, struct dns_rrec))) { @@ -221,8 +221,8 @@ DNS_ERROR dns_create_tkey_record(TALLOC_CTX *mem_ctx, const char *keyname, uint16 key_length, const uint8 *key, struct dns_rrec **prec) { - struct dns_buffer *buf; - struct dns_domain_name *algorithm; + struct dns_buffer *buf = NULL; + struct dns_domain_name *algorithm = NULL; DNS_ERROR err; if (!(buf = dns_create_buffer(mem_ctx))) { @@ -371,8 +371,8 @@ DNS_ERROR dns_create_probe(TALLOC_CTX *mem_ctx, const char *zone, const struct sockaddr_storage *sslist, struct dns_update_request **preq) { - struct dns_update_request *req; - struct dns_rrec *rec; + struct dns_update_request *req = NULL; + struct dns_rrec *rec = NULL; DNS_ERROR err; uint16 i; @@ -409,8 +409,8 @@ DNS_ERROR dns_create_update_request(TALLOC_CTX *mem_ctx, size_t num_addrs, struct dns_update_request **preq) { - struct dns_update_request *req; - struct dns_rrec *rec; + struct dns_update_request *req = NULL; + struct dns_rrec *rec = NULL; DNS_ERROR err; size_t i; |