lib: fix a NULL pointer caused error

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>
diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index b6aee99..9dc8ae7 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -101,6 +101,9 @@
 		cur_dist_name = "RHEL6";
 	}
 
+	if (cur_dist_name == NULL)
+		return tst_kvercmp(r1, r2, r3);
+
 	for (i = 0; vers[i].dist_name; i++) {
 		if (!strcmp(vers[i].dist_name, cur_dist_name)) {
 			printf("Detected %s using kernel version %s",