Commit a9e55159 authored by michael's avatar michael

make av_strdup(NULL) return NULL


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13250 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 13891089
......@@ -139,11 +139,13 @@ void *av_mallocz(unsigned int size)
char *av_strdup(const char *s)
{
char *ptr;
char *ptr= NULL;
if(s){
int len = strlen(s) + 1;
ptr = av_malloc(len);
if (ptr)
memcpy(ptr, s, len);
}
return ptr;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment