Fix CPU_SET dynamic allocation and leak (#205)

The initial implementation had a number of issues:
- The allocation of the CPU_SET should be checked for a NULL return.
- The CPU_*_S macros should be used when working with dynamic sets.
- The CPU_SET needs to be cleared via CPU_ZERO_S before use.
- Dynamic CPU_SETs need to be freed after use.
- The __riscv_hwprobe syscall is expecting a set *size* not a *count*.
diff --git a/src/riscv/linux/riscv-hw.c b/src/riscv/linux/riscv-hw.c
index ccee848..befdf3f 100644
--- a/src/riscv/linux/riscv-hw.c
+++ b/src/riscv/linux/riscv-hw.c
@@ -21,9 +21,16 @@
 	*uarch = cpuinfo_uarch_unknown;
 
 	/* Create a CPU set with this processor flagged. */
-	const size_t cpu_set_size = processor + 1;
-	cpu_set_t* cpu_set = CPU_ALLOC(cpu_set_size);
-	CPU_SET(processor, cpu_set);
+	const size_t cpu_count = processor + 1;
+	cpu_set_t* cpu_set = CPU_ALLOC(cpu_count);
+	if (cpu_set == NULL) {
+		cpuinfo_log_warning("failed to allocate space for cpu_set");
+		return;
+	}
+
+	const size_t cpu_set_size = CPU_ALLOC_SIZE(cpu_count);
+	CPU_ZERO_S(cpu_set_size, cpu_set);
+	CPU_SET_S(processor, cpu_set_size, cpu_set);
 
 	/* Request all available information from hwprobe. */
 	int ret = __riscv_hwprobe(pairs, pairs_count,
@@ -31,7 +38,7 @@
                                   0 /* flags */);
 	if (ret < 0) {
 		cpuinfo_log_warning("failed to get hwprobe information, err: %d", ret);
-		return;
+		goto cleanup;
 	}
 
 	/**
@@ -59,4 +66,7 @@
 	}
 	cpuinfo_riscv_decode_vendor_uarch(vendor_id, arch_id, imp_id,
 					  vendor, uarch);
+
+cleanup:
+	CPU_FREE(cpu_set);
 }