mirror of
https://github.com/openharmony/js_util_module.git
synced 2026-07-19 18:23:35 -04:00
Signed-off-by: shikai-123 <lifansheng1@huawei.com>
Modify defects of util
This commit is contained in:
+3
-6
@@ -284,16 +284,14 @@ namespace OHOS::Util {
|
||||
/* Memory cleanup function */
|
||||
void Base64::FreeMemory(unsigned char *address)
|
||||
{
|
||||
unsigned char *temp = address;
|
||||
if (temp != nullptr) {
|
||||
if (address != nullptr) {
|
||||
delete[] temp;
|
||||
temp = nullptr;
|
||||
}
|
||||
}
|
||||
void Base64::FreeMemory(char *address)
|
||||
{
|
||||
char *temp = address;
|
||||
if (temp != nullptr) {
|
||||
if (address != nullptr) {
|
||||
delete[] temp;
|
||||
temp = nullptr;
|
||||
}
|
||||
@@ -601,8 +599,7 @@ namespace OHOS::Util {
|
||||
|
||||
void FreeMemory(unsigned char *address)
|
||||
{
|
||||
unsigned char *temp = address;
|
||||
if (temp != nullptr) {
|
||||
if (address != nullptr) {
|
||||
delete[] temp;
|
||||
temp = nullptr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user