From 08c1eaa8aa0e6928bb5067df417ac785c1bce326 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 7 Apr 2004 18:46:47 +0000 Subject: Memory allocation fixes. --- lib/rlib.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/rlib.c') diff --git a/lib/rlib.c b/lib/rlib.c index db84548..d973613 100644 --- a/lib/rlib.c +++ b/lib/rlib.c @@ -55,7 +55,11 @@ int rlibInit(r_stream* stream, long options) /* Init the stream for the current session */ if(!vmInit(stream)) + { + free(state); + stream->state = NULL; return R_NOMEM; + } state->options = options; -- cgit v1.2.3