@@ -251,12 +251,12 @@ [[obj description] cString]); else if (!append_str(ctx, "(nil)", 5)) return false; } @catch (id e) { - [e release]; - return false; + free(ctx->buf); + @throw e; } @finally { [pool release]; } break; @@ -486,21 +486,17 @@ if ((ctx.buf = malloc(1)) == NULL) return -1; for (ctx.i = 0; ctx.i < ctx.fmt_len; ctx.i++) { if (!states[ctx.state](&ctx)) { - if (ctx.buf != NULL) - free(ctx.buf); - + free(ctx.buf); return -1; } } if (ctx.state != STATE_STRING) { - if (ctx.buf != NULL) - free(ctx.buf); - + free(ctx.buf); return -1; } if (!append_str(&ctx, ctx.fmt + ctx.last, ctx.fmt_len - ctx.last)) { free(ctx.buf);