diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2014-09-14 08:48:07 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2014-09-14 08:48:07 +0200 |
| commit | 87f3451f2d2e992da862bce71816fbeb548513c8 (patch) | |
| tree | 2ba1e63eae9e3d6f740018571e0f7de41f6730e4 /text.c | |
| parent | fee0c5a6dc9314724b60f1e2057b764d45256e54 (diff) | |
| download | vis-87f3451f2d2e992da862bce71816fbeb548513c8.tar.gz vis-87f3451f2d2e992da862bce71816fbeb548513c8.tar.xz | |
All *_free(...) functions should accept a NULL argument
Diffstat (limited to 'text.c')
| -rw-r--r-- | text.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -457,6 +457,8 @@ static Change *change_alloc(Text *txt, size_t pos) { } static void change_free(Change *c) { + if (!c) + return; /* only free the new part of the span, the old one is still in use */ piece_free(c->new.start); if (c->new.start != c->new.end) |
