Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
2fd90ad1
Commit
2fd90ad1
authored
14 years ago
by
Danny Auble
Browse files
Options
Downloads
Patches
Plain Diff
fixed minor memory leak
parent
5a475e44
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
+13
-5
13 additions, 5 deletions
...accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
with
13 additions
and
5 deletions
src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c
+
13
−
5
View file @
2fd90ad1
...
...
@@ -113,12 +113,20 @@ static bool running_db_inx = 0;
extern
int
jobacct_storage_p_job_start
(
void
*
db_conn
,
struct
job_record
*
job_ptr
);
static
void
_partial_
destroy
_dbd_job_start
(
void
*
object
)
static
void
_partial_
free
_dbd_job_start
(
void
*
object
)
{
dbd_job_start_msg_t
*
req
=
(
dbd_job_start_msg_t
*
)
object
;
if
(
req
)
{
xfree
(
req
->
node_inx
);
xfree
(
req
->
block_id
);
}
}
static
void
_partial_destroy_dbd_job_start
(
void
*
object
)
{
dbd_job_start_msg_t
*
req
=
(
dbd_job_start_msg_t
*
)
object
;
if
(
req
)
{
_partial_free_dbd_job_start
(
req
);
xfree
(
req
);
}
}
...
...
@@ -1972,10 +1980,10 @@ extern int jobacct_storage_p_job_start(void *db_conn,
job_ptr
->
db_index
=
NO_VAL
;
if
(
slurm_send_slurmdbd_msg
(
SLURMDBD_VERSION
,
&
msg
)
<
0
)
{
xfree
(
req
.
block_id
);
_partial_free_dbd_job_start
(
&
req
);
return
SLURM_ERROR
;
}
xfree
(
req
.
block_id
);
_partial_free_dbd_job_start
(
&
req
);
return
SLURM_SUCCESS
;
}
/* If we don't have the db_index we need to wait for it to be
...
...
@@ -1984,7 +1992,7 @@ extern int jobacct_storage_p_job_start(void *db_conn,
rc
=
slurm_send_recv_slurmdbd_msg
(
SLURMDBD_VERSION
,
&
msg
,
&
msg_rc
);
if
(
rc
!=
SLURM_SUCCESS
)
{
if
(
slurm_send_slurmdbd_msg
(
SLURMDBD_VERSION
,
&
msg
)
<
0
)
{
xfree
(
req
.
block_id
);
_partial_free_dbd_job_start
(
&
req
);
return
SLURM_ERROR
;
}
}
else
if
(
msg_rc
.
msg_type
!=
DBD_ID_RC
)
{
...
...
@@ -1997,7 +2005,7 @@ extern int jobacct_storage_p_job_start(void *db_conn,
//info("here got %d for return code", resp->return_code);
slurmdbd_free_id_rc_msg
(
resp
);
}
xfree
(
req
.
block_id
);
_partial_free_dbd_job_start
(
&
req
);
return
rc
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment