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
84347b52
Commit
84347b52
authored
20 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
Fix a couple of memory leaks.
parent
7059a6c9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/read_config.c
+7
-6
7 additions, 6 deletions
src/common/read_config.c
src/slurmctld/read_config.c
+1
-0
1 addition, 0 deletions
src/slurmctld/read_config.c
with
8 additions
and
6 deletions
src/common/read_config.c
+
7
−
6
View file @
84347b52
...
@@ -68,6 +68,7 @@ bool all_slurmd_hosts = false;
...
@@ -68,6 +68,7 @@ bool all_slurmd_hosts = false;
#define NAME_HASH_LEN 512
#define NAME_HASH_LEN 512
static
names_ll_t
*
host_to_node_hashtbl
[
NAME_HASH_LEN
]
=
{
NULL
};
static
names_ll_t
*
host_to_node_hashtbl
[
NAME_HASH_LEN
]
=
{
NULL
};
static
names_ll_t
*
node_to_host_hashtbl
[
NAME_HASH_LEN
]
=
{
NULL
};
static
names_ll_t
*
node_to_host_hashtbl
[
NAME_HASH_LEN
]
=
{
NULL
};
static
char
*
this_hostname
=
NULL
;
static
void
_free_name_hashtbl
()
static
void
_free_name_hashtbl
()
{
{
...
@@ -94,6 +95,7 @@ static void _free_name_hashtbl()
...
@@ -94,6 +95,7 @@ static void _free_name_hashtbl()
}
}
node_to_host_hashtbl
[
i
]
=
NULL
;
node_to_host_hashtbl
[
i
]
=
NULL
;
}
}
xfree
(
this_hostname
);
}
}
static
void
_init_name_hashtbl
()
static
void
_init_name_hashtbl
()
...
@@ -159,7 +161,6 @@ static void _register_conf_node_aliases(char *node_name, char *node_hostname)
...
@@ -159,7 +161,6 @@ static void _register_conf_node_aliases(char *node_name, char *node_hostname)
{
{
hostlist_t
node_list
=
NULL
,
host_list
=
NULL
;
hostlist_t
node_list
=
NULL
,
host_list
=
NULL
;
char
*
hn
=
NULL
,
*
nn
;
char
*
hn
=
NULL
,
*
nn
;
static
char
*
me
=
NULL
;
if
(
node_name
==
NULL
||
*
node_name
==
'\0'
)
if
(
node_name
==
NULL
||
*
node_name
==
'\0'
)
return
;
return
;
...
@@ -169,16 +170,16 @@ static void _register_conf_node_aliases(char *node_name, char *node_hostname)
...
@@ -169,16 +170,16 @@ static void _register_conf_node_aliases(char *node_name, char *node_hostname)
}
}
return
;
return
;
}
}
if
(
!
me
)
{
if
(
!
this_hostna
me
)
{
me
=
xmalloc
(
MAX_NAME_LEN
);
this_hostna
me
=
xmalloc
(
MAX_NAME_LEN
);
getnodename
(
me
,
MAX_NAME_LEN
);
getnodename
(
this_hostna
me
,
MAX_NAME_LEN
);
}
}
if
(
strcasecmp
(
node_name
,
"localhost"
)
==
0
)
if
(
strcasecmp
(
node_name
,
"localhost"
)
==
0
)
node_name
=
me
;
node_name
=
this_hostna
me
;
if
(
node_hostname
==
NULL
)
if
(
node_hostname
==
NULL
)
node_hostname
=
node_name
;
node_hostname
=
node_name
;
if
(
strcasecmp
(
node_hostname
,
"localhost"
)
==
0
)
if
(
strcasecmp
(
node_hostname
,
"localhost"
)
==
0
)
node_hostname
=
me
;
node_hostname
=
this_hostna
me
;
node_list
=
hostlist_create
(
node_name
);
node_list
=
hostlist_create
(
node_name
);
#ifdef HAVE_FRONT_END
/* Common NodeHostname for all NodeName values */
#ifdef HAVE_FRONT_END
/* Common NodeHostname for all NodeName values */
...
...
This diff is collapsed.
Click to expand it.
src/slurmctld/read_config.c
+
1
−
0
View file @
84347b52
...
@@ -478,6 +478,7 @@ static int _parse_node_spec(char *in_line)
...
@@ -478,6 +478,7 @@ static int _parse_node_spec(char *in_line)
/* free allocated storage */
/* free allocated storage */
xfree
(
node_addr
);
xfree
(
node_addr
);
xfree
(
node_hostname
);
xfree
(
reason
);
xfree
(
reason
);
if
(
addr_list
)
if
(
addr_list
)
hostlist_destroy
(
addr_list
);
hostlist_destroy
(
addr_list
);
...
...
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