New signature and free() fix in sdb_query_lines