diff options
Diffstat (limited to 'jim-history.c')
-rw-r--r-- | jim-history.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/jim-history.c b/jim-history.c index d46ed7f..370769d 100644 --- a/jim-history.c +++ b/jim-history.c @@ -103,6 +103,11 @@ static int JimHistorySubCmdProc(Jim_Interp *interp, int argc, Jim_Obj *const *ar return Jim_CallSubCmd(interp, Jim_ParseSubCmd(interp, history_command_table, argc, argv), argc, argv); } +static void JimHistoryDelProc(Jim_Interp *interp, void *privData) +{ + Jim_Free(privData); +} + int Jim_historyInit(Jim_Interp *interp) { void **history; @@ -112,6 +117,6 @@ int Jim_historyInit(Jim_Interp *interp) history = Jim_Alloc(sizeof(*history)); *history = NULL; - Jim_CreateCommand(interp, "history", JimHistorySubCmdProc, history, NULL); + Jim_CreateCommand(interp, "history", JimHistorySubCmdProc, history, JimHistoryDelProc); return JIM_OK; } |