mirror of https://git.ffmpeg.org/ffmpeg.git
Merge remote-tracking branch 'qatar/master'
* qatar/master: mem: Make av_strdup allocate using av_realloc Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
21b3563dcb
|
@ -258,7 +258,7 @@ char *av_strdup(const char *s)
|
||||||
char *ptr = NULL;
|
char *ptr = NULL;
|
||||||
if (s) {
|
if (s) {
|
||||||
int len = strlen(s) + 1;
|
int len = strlen(s) + 1;
|
||||||
ptr = av_malloc(len);
|
ptr = av_realloc(NULL, len);
|
||||||
if (ptr)
|
if (ptr)
|
||||||
memcpy(ptr, s, len);
|
memcpy(ptr, s, len);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue