Revision: 561
Author: gtm.daemon
Date: Tue Jul 31 09:00:20 2012
Log: [Author: ejw]
Remove analyzer warning for returning released memory.
R=thomasvl
APPROVED=thomasvl
DELTA=4 (4 added, 0 deleted, 0 changed)
http://code.google.com/p/google-toolbox-for-mac/source/detail?r=561
Modified:
/trunk/Foundation/GTMStackTrace.m
=======================================
--- /trunk/Foundation/GTMStackTrace.m Tue Jul 24 13:30:18 2012
+++ /trunk/Foundation/GTMStackTrace.m Tue Jul 31 09:00:20 2012
@@ -53,6 +53,7 @@
} else {
// COV_NF_START - Don't know how to force this in a unittest
free(class_descs);
+ class_descs = NULL;
class_count = 0;
// COV_NF_END
}
@@ -89,6 +90,9 @@
// obj methods.
struct GTMClassDescription *class_descs
= GTMClassDescriptions(&class_desc_count);
+ if (class_descs == NULL) {
+ class_desc_count = 0;
+ }
// Iterate through the stack.
for (NSUInteger i = 0; i < count; ++i) {