diff options
author | Pierre Joye <pajoye@php.net> | 2011-01-19 15:23:07 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2011-01-19 15:23:07 +0000 |
commit | c278fb01d06c76c693e4477749075a2697ea40a8 (patch) | |
tree | 78f927f40681649dcb8ddb5ba675c78d03649af8 | |
parent | 434f3654dac9ee915a5b4f0a4dbc384d33e1d38c (diff) | |
download | php-git-c278fb01d06c76c693e4477749075a2697ea40a8.tar.gz |
- malloc may fail
-rw-r--r-- | ext/gd/gdcache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/gd/gdcache.c b/ext/gd/gdcache.c index a728d82548..2349e38b93 100644 --- a/ext/gd/gdcache.c +++ b/ext/gd/gdcache.c @@ -159,6 +159,9 @@ cacheFetch( char **error, void *key ) key_value_t *map; map = (key_value_t *)malloc(sizeof(key_value_t)); + if (map == NULL) { + return NULL; + } map->key = *(int *)key; map->value = 3; |