| 128 | } |
| 129 | |
| 130 | static char *profile_buffer_finish(profile_buffer_t *buffer) { |
| 131 | if (buffer->failed) { |
| 132 | free(buffer->data); |
| 133 | profile_buffer_init(buffer); |
| 134 | return NULL; |
| 135 | } |
| 136 | if (!buffer->data) { |
| 137 | buffer->data = (char *)calloc(1U, 1U); |
| 138 | } |
| 139 | char *result = buffer->data; |
| 140 | profile_buffer_init(buffer); |
| 141 | return result; |
| 142 | } |
| 143 | |
| 144 | static void profile_buffer_discard(profile_buffer_t *buffer) { |
| 145 | free(buffer->data); |
no test coverage detected