diff options
author | Alexander Shpilkin <ashpilkin@gmail.com> | 2012-01-11 20:15:23 +0400 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2012-01-12 08:40:54 +1000 |
commit | 46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d (patch) | |
tree | 349614568cbcd6b8b9a3dcf03759da7459330b5d | |
parent | 43d0866133a899532fb459a35860060add504923 (diff) | |
download | jimtcl-46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d.zip jimtcl-46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d.tar.gz jimtcl-46fb9d7ffdce5ccb7375f8ca86eca6d328e6363d.tar.bz2 |
Fix forgotten cleanup in the history extension
-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; } |