mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
gtx: Fix problems found by static analysis
Several static analysis tools have identified various problems: - possible memory leaks (scan-build, cppcheck) To resolve the above problems: - fix possible memory leaks by freeing memory This commit is a reorganization of commits developed by Pat Riehecky, who ran the static analysis tools and developed the fixes. Change-Id: Ica9e5a33bf33ae802fed0f1439fc3561d0406713 Reviewed-on: https://gerrit.openafs.org/14685 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: PatRiehecky <jcpunk@gmail.com> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
parent
ed81d57a5c
commit
387ab140f5
@ -82,12 +82,13 @@ keymap_BindToString(struct keymap_map *amap, char *astring,
|
||||
tmap = keymap_Create();
|
||||
code =
|
||||
BindIt(amap, tc, KEYMAP_SUBMAP, tmap, NULL, NULL);
|
||||
if (code) {
|
||||
free(tmap);
|
||||
return code;
|
||||
}
|
||||
} else {
|
||||
tmap = amap->entries[tc].u.submap;
|
||||
code = 0;
|
||||
}
|
||||
if (code)
|
||||
return code;
|
||||
amap = tmap; /* continue processing this map */
|
||||
}
|
||||
} /* while loop */
|
||||
|
Loading…
Reference in New Issue
Block a user