jim.c: Fix Object leak in zlib support
commit41c5ff1809f5d84569c3f435afc2db38f768791c
authorSteve Bennett <steveb@workware.net.au>
Sat, 8 Oct 2016 22:54:46 +0000 (9 08:54 +1000)
committerSteve Bennett <steveb@workware.net.au>
Sat, 8 Oct 2016 22:56:55 +0000 (9 08:56 +1000)
treec1482865cb4b5292dafc85afbe7360aed4761a16
parent1b0cdc3e669b69281371ab77893792d2d8621af9
jim.c: Fix Object leak in zlib support

Change Jim_SetResultFormatted() to increment/decrement the ref count
of any %#s parameters. This allows zero refcount objects to be passed in
and be freed automatically.

Reported-by: Evan Hunter <evan@ozhiker.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim-zlib.c
jim.c