diff options
-rw-r--r-- | jim-aio.c | 4 | ||||
-rw-r--r-- | jim-exec.c | 2 | ||||
-rw-r--r-- | jim-interactive.c | 6 | ||||
-rw-r--r-- | jim.c | 2 |
4 files changed, 7 insertions, 7 deletions
@@ -865,12 +865,12 @@ static int aio_cmd_copy(Jim_Interp *interp, int argc, Jim_Obj *const *argv) if (count >= 16384 && bufp == buf) { /* Heuristic check - for large copy speed-up */ buflen = 65536; - bufp = malloc(buflen); + bufp = Jim_Alloc(buflen); } } if (bufp != buf) { - free(bufp); + Jim_Free(bufp); } if (JimCheckStreamError(interp, af) || JimCheckStreamError(interp, outf)) { @@ -676,7 +676,7 @@ static int JimCreatePipeline(Jim_Interp *interp, int argc, Jim_Obj *const *argv, phandle_t **pidArrayPtr, int *inPipePtr, int *outPipePtr, int *errFilePtr) { - phandle_t *pidPtr = NULL; /* Points to malloc-ed array holding all + phandle_t *pidPtr = NULL; /* Points to alloc-ed array holding all * the pids of child processes. */ int numPids = 0; /* Actual number of processes that exist * at *pidPtr right now. */ diff --git a/jim-interactive.c b/jim-interactive.c index 11c894a..c6490ec 100644 --- a/jim-interactive.c +++ b/jim-interactive.c @@ -48,13 +48,13 @@ char *Jim_HistoryGetline(Jim_Interp *interp, const char *prompt) return result; #else int len; - char *line = malloc(MAX_LINE_LEN); + char *line = Jim_Alloc(MAX_LINE_LEN); fputs(prompt, stdout); fflush(stdout); if (fgets(line, MAX_LINE_LEN, stdin) == NULL) { - free(line); + Jim_Free(line); return NULL; } len = strlen(line); @@ -246,7 +246,7 @@ int Jim_InteractivePrompt(Jim_Interp *interp) Jim_AppendString(interp, scriptObjPtr, "\n", 1); } Jim_AppendString(interp, scriptObjPtr, line, -1); - free(line); + Jim_Free(line); if (Jim_ScriptIsComplete(interp, scriptObjPtr, &state)) break; @@ -2502,7 +2502,7 @@ static void StringAppendString(Jim_Obj *objPtr, const char *str, int len) if (objPtr->internalRep.strValue.maxLength < needlen || objPtr->internalRep.strValue.maxLength == 0) { needlen *= 2; - /* Inefficient to malloc() for less than 8 bytes */ + /* Inefficient to alloc for less than 8 bytes */ if (needlen < 7) { needlen = 7; } |