messageing BUGFIX proper use of realloc()
diff --git a/src/io.c b/src/io.c
index a596f55..a0fc9dc 100644
--- a/src/io.c
+++ b/src/io.c
@@ -226,7 +226,7 @@
if ((count + (len - matched)) >= size) {
/* get more memory */
size = size + BUFFERSIZE;
- chunk = realloc(chunk, (size + 1) * sizeof *chunk);
+ chunk = nc_realloc(chunk, (size + 1) * sizeof *chunk);
if (!chunk) {
ERRMEM;
return -1;
@@ -357,7 +357,7 @@
}
/* realloc message buffer, remember to count terminating null byte */
- msg = realloc(msg, len + chunk_len + 1);
+ msg = nc_realloc(msg, len + chunk_len + 1);
if (!msg) {
ERRMEM;
ret = NC_MSG_ERROR;