in case of out of memory break sync
authorVolker Birk <vb@pep.foundation>
Sun, 21 Oct 2018 11:53:09 +0200
branchsync
changeset 3076feab4daed302
parent 3075 207b1a595665
child 3077 cef37ebda63b
in case of out of memory break
src/keymanagement.c
     1.1 --- a/src/keymanagement.c	Sun Oct 21 11:49:07 2018 +0200
     1.2 +++ b/src/keymanagement.c	Sun Oct 21 11:53:09 2018 +0200
     1.3 @@ -1843,8 +1843,10 @@
     1.4          switch (thing) {
     1.5              case _pgp_fpr:
     1.6                  identity = new_identity(NULL, NULL, PEP_OWN_USERID, NULL);
     1.7 -                if (!identity)
     1.8 +                if (!identity) {
     1.9                      status = PEP_OUT_OF_MEMORY;
    1.10 +                    break;
    1.11 +                }
    1.12                  identity->me = true;
    1.13                  fpr = strdup(_sl->value);
    1.14                  assert(fpr);