diff options
author | LAN-TW <lantw44@gmail.com> | 2013-12-08 00:06:15 +0800 |
---|---|---|
committer | LAN-TW <lantw44@gmail.com> | 2013-12-08 00:06:15 +0800 |
commit | a464ef5069efe62074a5b4d6af8e3e831bc52bd0 (patch) | |
tree | 2c646fcf2e988ec26f16905b58e03eef76a9a1e7 /l4array2.c | |
parent | 06159197d374e33d37aaaaed2b8b603cd65a270d (diff) | |
download | l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar.gz l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar.bz2 l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar.lz l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar.xz l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.tar.zst l4basic-a464ef5069efe62074a5b4d6af8e3e831bc52bd0.zip |
Check NULL pointer before unref
Diffstat (limited to 'l4array2.c')
-rw-r--r-- | l4array2.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -37,6 +37,9 @@ void* lbs_array2_ref_generic (void* array2_generic) { } void lbs_array2_unref_generic (void* array2_generic) { + if (array2_generic == NULL) { + return; + } LbsArray2* array2 = LBS_ARRAY2 (array2_generic); array2->ref_count--; if (array2->ref_count <= 0) { |