projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
871eb54
)
RNCFG: if we are going to overwrite the contents of a pointer, free these contents.
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 10 Feb 2013 15:08:55 +0000
(16:08 +0100)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 10 Feb 2013 15:08:55 +0000
(16:08 +0100)
citadel/netconfig.c
patch
|
blob
|
history
diff --git
a/citadel/netconfig.c
b/citadel/netconfig.c
index 0f89d4474aa3468ed0ef0919a94f52a0232d8afa..916835e53465f53f98b6f281674197ce1067e4ad 100644
(file)
--- a/
citadel/netconfig.c
+++ b/
citadel/netconfig.c
@@
-165,7
+165,7
@@
int ReadRoomNetConfigFile(OneRoomNetCfg **pOneRNCfg, char *filename)
const CfgLineType *pCfg;
StrBuf *Line;
StrBuf *InStr;
- OneRoomNetCfg *OneRNCfg;
+ OneRoomNetCfg *OneRNCfg
= NULL
;
fd = open(filename, O_NONBLOCK|O_RDONLY);
if (fd == -1) {
@@
-173,7
+173,10
@@
int ReadRoomNetConfigFile(OneRoomNetCfg **pOneRNCfg, char *filename)
return 0;
}
if (*pOneRNCfg != NULL)
+ {
OneRNCfg = *pOneRNCfg;
+ FreeRoomNetworkStructContent (OneRNCfg);
+ }
else
OneRNCfg = malloc(sizeof(OneRoomNetCfg));
memset(OneRNCfg, 0, sizeof(OneRoomNetCfg));