EXTRA_OBJS=@EXTRA_OBJECTS@
-CLI_OBJS = client.o nameserv.o getdate.o cmdparse.o \
+CLI_OBJS = client.o cmdparse.o getdate.o memory.o nameserv.o \
pktlength.o util.o $(HASH_OBJ)
ALL_OBJS = $(OBJS) $(EXTRA_OBJS) $(CLI_OBJS)
#include "candm.h"
#include "logging.h"
+#include "memory.h"
#include "nameserv.h"
#include "hash.h"
#include "getdate.h"
line[sizeof(line) - 1] = '\0';
add_history(cmd);
/* free the buffer allocated by readline */
- free(cmd);
+ Free(cmd);
} else {
/* simulate the user has entered an empty line */
*line = '\0';
if (password) {
for (i = 0; i < password_length; i++)
password[i] = 0;
- free(password);
+ Free(password);
password = NULL;
}
password_length = UTI_DecodePasswordFromText(p);
if (password_length > 0) {
- password = malloc(password_length);
+ password = Malloc(password_length);
memcpy(password, p, password_length);
}
total_length += strlen(argv[i]) + 1;
}
- line = (char *) malloc((2 + total_length) * sizeof(char));
+ line = (char *) Malloc((2 + total_length) * sizeof(char));
for (i = 0; i < argc; i++) {
line[0] = '\0';
break;
}
- free(line);
+ Free(line);
return ret;
}
close_io();
- free(password);
+ Free(password);
return !ret;
}