diff options
| author | gjelinek <none@none> | 2008-06-09 16:43:33 -0700 |
|---|---|---|
| committer | gjelinek <none@none> | 2008-06-09 16:43:33 -0700 |
| commit | 09a8462db8f9c9bce133a1cb446fe98188253eef (patch) | |
| tree | 28d737b83e61b35d36d8af2ab0140672a0b25ac7 /usr/src/lib/libzonecfg | |
| parent | 22872efb9462b28180d11ea401344608e641a5aa (diff) | |
| download | illumos-joyent-09a8462db8f9c9bce133a1cb446fe98188253eef.tar.gz | |
6710545 fix for 6550154 doesn't always ignore older patches
Diffstat (limited to 'usr/src/lib/libzonecfg')
| -rw-r--r-- | usr/src/lib/libzonecfg/common/libzonecfg.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/usr/src/lib/libzonecfg/common/libzonecfg.c b/usr/src/lib/libzonecfg/common/libzonecfg.c index d68533aa79..ae4f1d47e1 100644 --- a/usr/src/lib/libzonecfg/common/libzonecfg.c +++ b/usr/src/lib/libzonecfg/common/libzonecfg.c @@ -7289,7 +7289,10 @@ save_patch(patch_node_t *patch, uu_avl_t *patches_avl) patch_node_t *existing; uu_avl_index_t where; - /* Check if this is a newer version of a patch we already have. */ + /* + * Check if this is a newer version of a patch we already have. + * If it is an older version of a patch we already have, ignore it. + */ if ((existing = (patch_node_t *)uu_avl_find(patches_avl, patch, NULL, &where)) != NULL) { char *endptr; @@ -7301,10 +7304,12 @@ save_patch(patch_node_t *patch, uu_avl_t *patches_avl) if (pvers > evers) { free(existing->patch_vers); existing->patch_vers = patch->patch_vers; - free(patch->patch_num); - free(patch); - return; + } else { + free(patch->patch_vers); } + free(patch->patch_num); + free(patch); + return; } uu_avl_insert(patches_avl, patch, where); |
