Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Don't free ctx->mainfn if context build fails; it wasn't ever set.
  • Loading branch information
icculus committed May 29, 2016
1 parent f5f7b41 commit 14c5677
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mojoshader.c
Expand Up @@ -11158,15 +11158,13 @@ static Context *build_context(const char *profile,
ctx->errors = errorlist_create(MallocBridge, FreeBridge, ctx);
if (ctx->errors == NULL)
{
f((void *) ctx->mainfn, d);
f(ctx, d);
return NULL;
} // if

if (!set_output(ctx, &ctx->mainline))
{
errorlist_destroy(ctx->errors);
f((void *) ctx->mainfn, d);
f(ctx, d);
return NULL;
} // if
Expand Down

0 comments on commit 14c5677

Please sign in to comment.