diff --git a/backend.c b/backend.c index 22f65a7c..f596c96e 100644 --- a/backend.c +++ b/backend.c @@ -249,9 +249,12 @@ SR_API int sr_init(struct sr_context **ctx) #endif *ctx = context; + context = NULL; ret = SR_OK; done: + if (context) + g_free(context); return ret; }