summaryrefslogtreecommitdiff
path: root/lib/rlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rlib.c')
-rw-r--r--lib/rlib.c4
1 files changed, 4 insertions, 0 deletions
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;