API: Properly handle allocation failures in x264_param_parse()

Check to make sure no call to strdup() failed to allocate.

A new return code, X264_PARAM_ALLOC_FAILED, which is consistent
with the existing documentation, has been added to accomodate
this.

Further, this also properly handles repeated calls to the
function with the same name, and no longer leaks when this
happens.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
10 jobs for api_leak_fix in 8 minutes and 41 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #384309
aarch64 docker
build-debian-aarch64

00:07:50

passed #384308
amd64 docker
build-debian-amd64

00:02:22

passed #384312
macos
build-macos

00:01:36

passed #384310
amd64 docker
build-win32

00:02:55

passed #384311
amd64 docker
build-win64

00:02:11

 
  Test
passed #384314
aarch64 docker
test-debian-aarch64

00:00:24

passed #384313
amd64 docker
test-debian-amd64

00:00:48

passed #384317
macos
test-macos

00:00:04

passed #384315
amd64 docker
test-win32

00:00:16

passed #384316
amd64 docker
test-win64

00:00:20