| 1250 | } |
| 1251 | |
| 1252 | void free_notes(struct notes_tree *t) |
| 1253 | { |
| 1254 | if (!t) |
| 1255 | t = &default_notes_tree; |
| 1256 | if (t->root) |
| 1257 | note_tree_free(t->root); |
| 1258 | free(t->root); |
| 1259 | while (t->first_non_note) { |
| 1260 | t->prev_non_note = t->first_non_note->next; |
| 1261 | free(t->first_non_note->path); |
| 1262 | free(t->first_non_note); |
| 1263 | t->first_non_note = t->prev_non_note; |
| 1264 | } |
| 1265 | free(t->ref); |
| 1266 | memset(t, 0, sizeof(struct notes_tree)); |
| 1267 | } |
| 1268 | |
| 1269 | /* |
| 1270 | * Fill the given strbuf with the notes associated with the given object. |
no test coverage detected