|
@@ -178,8 +178,8 @@ void ima_store_measurement(struct integrity_iint_cache *iint,
|
|
strncpy(entry->template.file_name, filename, IMA_EVENT_NAME_LEN_MAX);
|
|
strncpy(entry->template.file_name, filename, IMA_EVENT_NAME_LEN_MAX);
|
|
|
|
|
|
result = ima_store_template(entry, violation, inode);
|
|
result = ima_store_template(entry, violation, inode);
|
|
- if (!result)
|
|
|
|
|
|
+ if (!result || result == -EEXIST)
|
|
iint->flags |= IMA_MEASURED;
|
|
iint->flags |= IMA_MEASURED;
|
|
- else
|
|
|
|
|
|
+ if (result < 0)
|
|
kfree(entry);
|
|
kfree(entry);
|
|
}
|
|
}
|