History

avcodec/vulkan_encode_h264: Fix memleak on error

Andreas Rheinhardt committed 1 year ago

Commit 70fa44d1 parent b18aaf21 file · +4 −2Browse files

Unified · Split

libavcodec/vulkan_encode_h264.c+4−2
@@ -1065,7 +1065,7 @@ static int parse_feedback_units(AVCodecContext *avctx, · 1064 unmodified lines
10651065 if (err < 0) {
10661066 av_log(avctx, AV_LOG_ERROR, "Unable to parse feedback units, bad drivers: %s\n",
10671067 av_err2str(err));
1068− return err;
1068+ goto fail;
10691069 }
10701070
10711071 /* If PPS has an override, just copy it entirely. */
@@ -1079,10 +1079,12 @@ static int parse_feedback_units(AVCodecContext *avctx, · 7 unmodified lines
10791079 }
10801080 }
10811081
1082+ err = 0;
1083+fail:
10821084 ff_cbs_fragment_free(&au);
10831085 ff_cbs_close(&cbs);
10841086
1085− return 0;
1087+ return err;
10861088 }
10871089
10881090 static int init_base_units(AVCodecContext *avctx)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t