Changeset 953 for pjproject/trunk/pjlib/src/pj/pool_buf.c
- Timestamp:
- Feb 16, 2007 9:44:36 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/src/pj/pool_buf.c
r839 r953 54 54 { 55 55 struct creation_param *param; 56 void *buf; 56 57 57 58 PJ_UNUSED_ARG(factory); 58 59 59 60 param = pj_thread_local_get(tls); 60 PJ_ASSERT_RETURN(param != NULL, NULL); 61 if (param == NULL) { 62 /* Don't assert(), this is normal no-memory situation */ 63 return NULL; 64 } 61 65 62 66 pj_thread_local_set(tls, NULL); … … 64 68 PJ_ASSERT_RETURN(size <= param->size, NULL); 65 69 66 return param->stack_buf; 70 buf = param->stack_buf; 71 72 /* Prevent the buffer from being reused */ 73 param->stack_buf = NULL; 74 75 return buf; 67 76 } 68 77
Note: See TracChangeset
for help on using the changeset viewer.