jung-kurt / luahpdf

LuaHPDF is a module that lets you programmatically create PDF files using Lua.
23 stars 10 forks source link

linters-driven (clang,cppcheck) fixes + proper lua5.1 re-fix #9

Closed msva closed 6 years ago

jung-kurt commented 6 years ago

Thanks, @msva. Most changes look good, and I am glad to learn about the "we" argument to fopen(). However, I disagree with the relocation of the fclose() here. fclose() should not be called with a null pointer in the event of an error. Did lint suggest that change?

msva commented 6 years ago

@jung-kurt yup. cppcheck says: [hpdf.c:954]: (error) Resource leak: fl

jung-kurt commented 6 years ago

Thanks, @msva. I tweaked the trouble spots a little.