Allocate a buffer of n bytes in the string pool & return its buffer pointer. Return a NULL pointer if the pool is exhausted
| 231 | // Allocate a buffer of n bytes in the string pool & return its buffer pointer. |
| 232 | // Return a NULL pointer if the pool is exhausted |
| 233 | static ISC_UCHAR* AllocStringPool(int n) |
| 234 | { |
| 235 | for (int i = 0; i < MAX_PARAMS; i++) |
| 236 | { |
| 237 | if (! stringPool[i]) |
| 238 | { |
| 239 | stringPool[i] = (ISC_UCHAR *)malloc(n); |
| 240 | return (stringPool[i]); |
| 241 | } |
| 242 | } |
| 243 | return (NULL); |
| 244 | } |
| 245 | |
| 246 | // Allocate an integer in the intPool & return a pointer to it. Return a NULL |
| 247 | // pointer if the pool is exhausted |
no outgoing calls
no test coverage detected