aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-05-17 21:30:02 +0200
committerShauren <shauren.trinity@gmail.com>2013-05-17 21:30:02 +0200
commit7d4670341387568e89d21a8e0d702230e0ab962d (patch)
treef6e409bb8899dc546fcf96a53abbd5bb025bda43 /src/server/scripts/Commands
parent8be181c7e60daf9833044da61b379c2136892c37 (diff)
Core/Misc: Another batch of fixes for issues found by static analysis
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_rbac.cpp42
1 files changed, 18 insertions, 24 deletions
diff --git a/src/server/scripts/Commands/cs_rbac.cpp b/src/server/scripts/Commands/cs_rbac.cpp
index 604218c2e68..667815ce16c 100644
--- a/src/server/scripts/Commands/cs_rbac.cpp
+++ b/src/server/scripts/Commands/cs_rbac.cpp
@@ -32,6 +32,12 @@ EndScriptData */
struct RBACCommandData
{
RBACCommandData(): id(0), realmId(0), rbac(NULL), needDelete(false) { }
+ ~RBACCommandData()
+ {
+ if (needDelete)
+ delete rbac;
+ }
+
uint32 id;
int32 realmId;
RBACData* rbac;
@@ -230,8 +236,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -266,8 +271,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -295,8 +299,7 @@ public:
}
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -335,8 +338,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -375,8 +377,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -411,8 +412,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -453,8 +453,7 @@ public:
}
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -493,8 +492,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -533,8 +531,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -569,8 +566,7 @@ public:
break;
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -613,8 +609,7 @@ public:
}
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}
@@ -643,8 +638,7 @@ public:
}
}
- if (command->needDelete)
- delete command;
+ delete command;
return true;
}