Fix an issue in tsearch

Signed-off-by: Jithin Jose <jithin.jose@intel.com>