diff --git a/tsk/vs/mac.c b/tsk/vs/mac.c index bde5ba1523e40084c1b1ca82e51ad1e814e83ec1..e609ce8b7c19fb8b5f5eee2fed78d9fbc9d105dc 100644 --- a/tsk/vs/mac.c +++ b/tsk/vs/mac.c @@ -148,11 +148,17 @@ mac_load_table(TSK_VS_INFO * vs) if (NULL == tsk_vs_part_add(vs, (TSK_DADDR_T) part_start, (TSK_DADDR_T) part_size, (TSK_VS_PART_FLAG_ENUM)flag, str, -1, idx)) + free(part_buf); return 1; } free(part_buf); part_buf = NULL; + // Bail if we did find any valid entries + if (vs->part_count == 0) { + return 1; + } + /* Add an entry for the table length */ if ((table_str = tsk_malloc(16)) == NULL) { return 1;