summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-10 14:21:28 -0800
committerJeremy Allison <jra@samba.org>2007-12-10 14:21:28 -0800
commit921bbc1331d35785e2c691551d4c103c9c29ed4d (patch)
treeadd53697ee5f1bf45bd68504ad081c7f5af32936
parent29c104fd60081756d734e21aeb4b865951e06948 (diff)
downloadsamba-921bbc1331d35785e2c691551d4c103c9c29ed4d.tar.gz
samba-921bbc1331d35785e2c691551d4c103c9c29ed4d.tar.bz2
samba-921bbc1331d35785e2c691551d4c103c9c29ed4d.zip
Fix errors from next_token conversion. Spotted by
Andreas Schneider <anschneider@suse.de>. Jeremy. (This used to be commit b40efc2fe63a3420b62fbf1ea8936112c5a24bdc)
-rw-r--r--source3/libsmb/namequery.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index 0decc59ed7..c0d6b6e91e 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -791,12 +791,12 @@ bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
*pp_name = NULL;
while(!x_feof(fp) && !x_ferror(fp)) {
- char *ip;
- char *flags;
- char *extra;
- char *name;
+ char *ip = NULL;
+ char *flags = NULL;
+ char *extra = NULL;
+ char *name = NULL;
const char *ptr;
- char *ptr1;
+ char *ptr1 = NULL;
int count = 0;
*name_type = -1;
@@ -809,10 +809,6 @@ bool getlmhostsent(TALLOC_CTX *ctx, XFILE *fp, char **pp_name, int *name_type,
continue;
}
- ip[0] = '\0';
- name[0] = '\0';
- flags[0] = '\0';
-
ptr = line;
if (next_token_talloc(ctx, &ptr, &ip, NULL))