[FIX] Fix memory leakages when deactivating multiple times.

This commit is contained in:
lda 2023-09-20 08:10:50 +02:00
parent 1550a6ad29
commit 2d1c51beca
Signed by: lda
GPG key ID: 6898757653ABE3E6

View file

@ -452,10 +452,10 @@ UserDeactivateWithInfo(User * user, char * admin, char * reason)
JsonValue * val;
val = JsonValueString(admin);
JsonSet(json, val, 2, "deactivate", "admin");
JsonValueFree(JsonSet(json, val, 2, "deactivate", "admin"));
val = JsonValueString(reason);
JsonSet(json, val, 2, "deactivate", "reason");
JsonValueFree(JsonSet(json, val, 2, "deactivate", "reason"));
}
return 1;