Skip to content

Commit a061a4b

Browse files
1a1a11aCopilot
andcommitted
Update libCacheSim/cache/eviction/plugin_cache.c
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 8e86775 commit a061a4b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

libCacheSim/cache/eviction/plugin_cache.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,12 @@ static void pluginCache_parse_params(cache_t *cache,
371371
char *key = strsep((char **)&params_str, "=");
372372
char *value = strsep((char **)&params_str, ",");
373373

374+
// Check if value is NULL
375+
if (value == NULL) {
376+
ERROR("Parameter '%s' is missing a value in cache '%s'\n", key,
377+
cache->cache_name);
378+
exit(1);
379+
}
374380
// Skip whitespace
375381
while (params_str != NULL && *params_str == ' ') {
376382
params_str++;

0 commit comments

Comments
 (0)