If we need a FILE stream then get one...
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 7 Jul 2011 19:51:29 +0000 (22:51 +0300)
committerPanu Matilainen <Panu Matilainen pmatilai@redhat.com>
Fri, 8 Jul 2011 07:15:58 +0000 (10:15 +0300)
commita2d68d1ea3afa974f7038ab1cc434fd9551d1334
tree655b09976c5ae6b48ac625886e561fe38d265a13
parenta12aa47808d15376b6571303906829abb3027bf7
If we need a FILE stream then get one...

- Replace the hysterical "lets see if the temp creation gave an fpio
  fd (it didn't), if not open another fd and then get its private
  FILE pointer" fiddling: since we need a FILE stream then open one
  with fdopen(), duh. Grabbing a rpmio fd to begin with is stupid enough
  when all we want is a stream, but wanting to use rpmMkTempFile()
  functionality...
- Also fixes an fd+mem leak in the unlikely but possible case that
  rpmMkTempFile() succeeds but fdopen() fails.
build/build.c