projects
/
platform
/
core
/
context
/
job-scheduler.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bb22d5
)
Fix a possible memory leak in job_scheduler.cpp
36/134136/1
author
Mu-Woong Lee
<muwoong.lee@samsung.com>
Thu, 15 Jun 2017 02:13:12 +0000
(11:13 +0900)
committer
Mu-Woong Lee
<muwoong.lee@samsung.com>
Thu, 15 Jun 2017 02:13:12 +0000
(11:13 +0900)
Change-Id: I01eafcb6a075abc97cbe2bf71b2f9fba75e013f6
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
src/client/job_scheduler.cpp
patch
|
blob
|
history
diff --git
a/src/client/job_scheduler.cpp
b/src/client/job_scheduler.cpp
index
69a4246
..
d349deb
100644
(file)
--- a/
src/client/job_scheduler.cpp
+++ b/
src/client/job_scheduler.cpp
@@
-211,7
+211,12
@@
static void __stopJob(JobInfo* jobInfo, void* userData)
{
ctx_sched_s* scheduler = static_cast<ctx_sched_s*>(userData);
ctx_sched_job_s* job = new(std::nothrow) ctx_sched_job_s();
- IF_FAIL_VOID_TAG(job, _E, E_STR_ALLOC);
+
+ if (!job) {
+ _E_ALLOC;
+ delete jobInfo;
+ return;
+ }
job->jobInfo = jobInfo;
scheduler->stopJobCb(scheduler, job, scheduler->userData);