Fix linkage
Fix a memleak
Fix a missing return

Makes coverity happy
Fix CID #1198558
Fix CID #1196412
Fix CID #1196407, #1196406
Fix CID #1195080
Fix segfaulting on analysis
Refix segfault/infinite loop
Merge pull request #802 from jvoisin/patch-4

Fix a missing return
Merge pull request #800 from jvoisin/patch-2

Fix a memleak
Fix #801 - Fix an unitialised variable
Fix CID #1134814
Fix CID #1152204
Fix CID #1134729
Fix CID #1134744
Fixing search static buffer and const-ifying non-const pointer
removing offending free
Fixing some Null Dereference Bugs courtesy of coverity
some minor fixes