* fix loadFile when alloc error * fix loadFile when alloc error (basic128rsa15)
@@ -26,6 +26,8 @@ static UA_ByteString loadFile(const char *const path) {
size_t read = fread(fileContents.data, sizeof(UA_Byte), fileContents.length, fp);
if(read != fileContents.length)
UA_ByteString_deleteMembers(&fileContents);
+ } else {
+ fileContents.length = 0;
}
fclose(fp);
@@ -40,6 +40,8 @@ loadFile(const char *const path) {