diff options
author | jbj <devnull@localhost> | 2001-01-25 12:58:03 +0000 |
---|---|---|
committer | jbj <devnull@localhost> | 2001-01-25 12:58:03 +0000 |
commit | 5ae2e10e9eaef7c0ca0104c0294f16eb66c9958e (patch) | |
tree | aa530811cb62aadacb8cf9c215dbf88672216d84 /build | |
parent | f0853f68436ca65cc891d32719fc74c98bbf4ce5 (diff) | |
download | librpm-tizen-5ae2e10e9eaef7c0ca0104c0294f16eb66c9958e.tar.gz librpm-tizen-5ae2e10e9eaef7c0ca0104c0294f16eb66c9958e.tar.bz2 librpm-tizen-5ae2e10e9eaef7c0ca0104c0294f16eb66c9958e.zip |
Isolate install/erase actions.
Start wrapping src rpm installs in a transaction.
CVS patchset: 4497
CVS date: 2001/01/25 12:58:03
Diffstat (limited to 'build')
-rw-r--r-- | build/files.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/build/files.c b/build/files.c index 7be4698e6..4caabb6f7 100644 --- a/build/files.c +++ b/build/files.c @@ -1089,7 +1089,7 @@ static void genCpioListAndHeader(struct FileList *fl, TFI_t *cpioList, rpmlibNeedsFeature(h, "CompressedFileNames", "3.0.4-1"); } - { TFI_t fi = xmalloc(sizeof(*fi) * fl->fileListRecsUsed); + { TFI_t fi = xcalloc(sizeof(*fi), 1); char * a, * d; fi->type = TR_ADDED; @@ -1097,13 +1097,14 @@ static void genCpioListAndHeader(struct FileList *fl, TFI_t *cpioList, if (fi->dnl) { free((void *)fi->dnl); fi->dnl = NULL; } + if (fi->bnl) { + free((void *)fi->bnl); fi->bnl = NULL; + } + fi->dnl = xmalloc(fi->fc * sizeof(*fi->dnl) + dpathlen); d = (char *)(fi->dnl + fi->fc); *d = '\0'; - if (fi->bnl) { - free((void *)fi->bnl); fi->bnl = NULL; - } fi->bnl = xmalloc(fi->fc * (sizeof(*fi->bnl) + sizeof(*fi->dil))); fi->dil = (int *)(fi->bnl + fi->fc); |