git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
460597d
)
s3: Fix a (highly unlikly) memleak in set_local_machine_name()
author
Volker Lendecke
<vl@samba.org>
Sat, 28 Aug 2010 12:15:31 +0000
(14:15 +0200)
committer
Volker Lendecke
<vl@samba.org>
Sat, 28 Aug 2010 12:15:45 +0000
(14:15 +0200)
source3/lib/substitute.c
patch
|
blob
|
history
diff --git
a/source3/lib/substitute.c
b/source3/lib/substitute.c
index e655128f49936aaa38a8d247cadcf0f29852317d..d7ca1841efea540d95fbb23c4f3e3cc1d53b1ca7 100644
(file)
--- a/
source3/lib/substitute.c
+++ b/
source3/lib/substitute.c
@@
-47,16
+47,16
@@
bool set_local_machine_name(const char *local_name, bool perm)
char *tmp_local_machine = NULL;
size_t len;
+ if (already_perm) {
+ return true;
+ }
+
tmp_local_machine = SMB_STRDUP(local_name);
if (!tmp_local_machine) {
return false;
}
trim_char(tmp_local_machine,' ',' ');
- if (already_perm) {
- return true;
- }
-
SAFE_FREE(local_machine);
len = strlen(tmp_local_machine);
local_machine = SMB_CALLOC_ARRAY(char, len+1);