ALT Linux Bugzilla
– Attachment 8215 Details for
Bug 37077
Регрегрессия при назначении групп
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Memory leaks analyze 001
leaks001.diff (text/plain), 1.46 KB, created by
Evgeny Sinelnikov
on 2019-08-02 19:33:45 MSK
(
hide
)
Description:
Memory leaks analyze 001
Filename:
MIME Type:
Creator:
Evgeny Sinelnikov
Created:
2019-08-02 19:33:45 MSK
Size:
1.46 KB
patch
obsolete
>diff --git a/nss_role.c b/nss_role.c >index 9de9ab9..aceee05 100644 >--- a/nss_role.c >+++ b/nss_role.c >@@ -17,9 +17,9 @@ enum nss_status _nss_role_initgroups_dyn(char *user, gid_t main_group, > enum nss_status ret = NSS_STATUS_SUCCESS; > pthread_mutex_lock(&mutex); > >- struct librole_graph G; >+ struct librole_graph G = {}; > int i, result; >- librole_group_collector col, ans; >+ librole_group_collector col = {}, ans = {}; > > result = librole_graph_init(&G); > if (result != LIBROLE_OK) { >diff --git a/parser.c b/parser.c >index d543f51..234bea8 100644 >--- a/parser.c >+++ b/parser.c >@@ -204,7 +204,7 @@ static int parse_line(char *line, struct librole_graph *G) > comment = select_line_part(line, len, &last, &i, ':'); > > if (comment && *last == '\0') >- return result; >+ goto libnss_role_parse_line_error; > > drop_quotes(&last); > result = librole_get_gid(last, &role.gid); >@@ -255,8 +255,10 @@ int librole_reading(const char *s, struct librole_graph *G) > return LIBROLE_OUT_OF_RANGE; > > f = fopen(s, "r"); >- if (!f) >- return LIBROLE_IO_ERROR; >+ if (!f) { >+ result = LIBROLE_IO_ERROR; >+ goto libnss_role_reading_out_free; >+ } > > while(1) { > c = fgetc(f); >@@ -287,8 +289,9 @@ int librole_reading(const char *s, struct librole_graph *G) > } > > libnss_role_reading_out: >- free(str); > fclose(f); >+libnss_role_reading_out_free: >+ free(str); > return result; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 37077
: 8215