diff --git a/src/calibre/ebooks/pdf/fonts.cpp b/src/calibre/ebooks/pdf/fonts.cpp index c5261298ff..c3a709869e 100644 --- a/src/calibre/ebooks/pdf/fonts.cpp +++ b/src/calibre/ebooks/pdf/fonts.cpp @@ -138,6 +138,7 @@ Fonts::size_type Fonts::add_font(string* font_name, double size, GfxRGB rgb) { XMLFont *f = NULL; if (font_name == NULL) font_name = new string("Unknown"); + // font_name must not be deleted f = new XMLFont(font_name, size, rgb); return this->add_font(f);