Mercurial > hg
comparison mercurial/manifest.c @ 24293:30e9ee203846
lazymanifest: fail if path or hash strings cannot be created
While generating (path, hash, flags), we fail if flags cannot be
created. We should also fail if path or hash cannot be created.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 11 Mar 2015 13:35:34 -0700 |
parents | 40528ad1b1e8 |
children | 3d485727e45e |
comparison
equal
deleted
inserted
replaced
24292:b7add2ebef9e | 24293:30e9ee203846 |
---|---|
241 path = PyString_FromStringAndSize(l->start, pl); | 241 path = PyString_FromStringAndSize(l->start, pl); |
242 hash = nodeof(l); | 242 hash = nodeof(l); |
243 consumed = pl + 41; | 243 consumed = pl + 41; |
244 flags = PyString_FromStringAndSize(l->start + consumed, | 244 flags = PyString_FromStringAndSize(l->start + consumed, |
245 l->len - consumed - 1); | 245 l->len - consumed - 1); |
246 if (!flags) { | 246 if (!path || !hash || !flags) { |
247 goto bail; | 247 goto bail; |
248 } | 248 } |
249 ret = PyTuple_Pack(3, path, hash, flags); | 249 ret = PyTuple_Pack(3, path, hash, flags); |
250 bail: | 250 bail: |
251 Py_XDECREF(path); | 251 Py_XDECREF(path); |