int home=0;
char relhome[PATH_MAX]="";
char ctdldir[PATH_MAX]=CTDLDIR;
-
+ int lp;
calc_dirs_n_files(relh, home, relhome, ctdldir);
formout(ipc, "goodbye");
logoff(ipc, 0);
}
+ /* Free the ungoto list */
+ for (lp = 0; lp < uglistsize; lp++) {
+ free(uglist[lp]);
+ }
+ uglistsize = 0;
goto GSTA;
} /* end main() */
int CtdlIPCGetSystemConfigByType(CtdlIPC *ipc, const char *mimetype,
char **listing, char *cret)
{
+ register int ret;
char *aaa;
size_t bytes;
aaa = malloc(strlen(mimetype) + 13);
if (!aaa) return -1;
sprintf(aaa, "CONF GETSYS|%s", mimetype);
- return CtdlIPCGenericCommand(ipc, aaa, NULL, 0,
+ ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0,
listing, &bytes, cret);
+ free(aaa);
+ return ret;
}
int CtdlIPCSetSystemConfigByType(CtdlIPC *ipc, const char *mimetype,
const char *listing, char *cret)
{
+ register int ret;
char *aaa;
if (!cret) return -2;
aaa = malloc(strlen(mimetype) + 13);
if (!aaa) return -1;
sprintf(aaa, "CONF PUTSYS|%s", mimetype);
- return CtdlIPCGenericCommand(ipc, aaa, listing, strlen(listing),
+ ret = CtdlIPCGenericCommand(ipc, aaa, listing, strlen(listing),
NULL, NULL, cret);
+ free(aaa);
+ return ret;
}
/* QDIR */
int CtdlIPCDirectoryLookup(CtdlIPC *ipc, const char *address, char *cret)
{
+ register int ret;
char *aaa;
if (!address) return -2;
if (!aaa) return -1;
sprintf(aaa, "QDIR %s", address);
- return CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
+ ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, NULL, NULL, cret);
+ free(aaa);
+ return ret;
}
/* Now compose the message... */
if (client_make_message(ipc, temp, message.recipient,
message.anonymous, 0, c, message.subject) != 0) {
+ if (msgarr) free(msgarr);
return (2);
}
}
}
+ if (site_expirepolicy) free(site_expirepolicy);
+ if (mbx_expirepolicy) free(mbx_expirepolicy);
}
scr_printf("Wrote %d records.\n", num_recs);
modified = 0;
}
+ free(resp);
break;
case 'q':
quitting = !modified || boolprompt(
scr_printf("Wrote %d records.\n", num_recs);
modified = 0;
}
+ free(listing);
break;
case 'q':
quitting = !modified || boolprompt(
scr_printf("Wrote %d records.\n", num_recs);
modified = 0;
}
+ free(listing);
break;
case 'q':
quitting = !modified || boolprompt(