]> git.lyx.org Git - features.git/blobdiff - src/Buffer.cpp
Fix memory leak reported by Scott.
[features.git] / src / Buffer.cpp
index eb65e811b4588d76aae3a00042a1796de453e4d1..56e19b81be56189141cc7e2ca60f68f3b4bf4ffd 100644 (file)
@@ -545,8 +545,10 @@ Buffer::~Buffer()
                        if (it == cloned_buffers.end()) {
                                // We will leak in this case, but it is safe to continue.
                                LATTEST(false);
-                       } else
+                       } else {
+                               delete(*it);
                                cloned_buffers.erase(it);
+                       }
                        delete d->clone_list_;
                }
                // FIXME Do we really need to do this right before we delete d?