Displaying 1 result from an estimated 1 matches for "maybe_init".
2001 Dec 28
1
(patch) memory leak in loadparm.c
...lSection = True;
+static BOOL bsDefaultInitialized = False;
#define NUMPARAMETERS (sizeof(parm_table) / sizeof(struct parm_struct))
@@ -297,6 +299,28 @@
#ifdef LOG_DAEMON
Globals.syslog_facility = LOG_DAEMON;
#endif
+ if (!bsDefaultInitialized) {
+ bsDefaultInitialized = True;
+#define maybe_init(x) if (sDefault.x != NULL) sDefault.x = strdup(sDefault.x)
+ maybe_init(name);
+ maybe_init(path);
+ maybe_init(comment);
+ maybe_init(lock_file);
+ maybe_init(uid);
+ maybe_init(gid);
+ maybe_init(hosts_allow);
+ maybe_init(hosts_deny);
+ maybe_init(auth_users);
+ may...