]> git.proxmox.com Git - rustc.git/blobdiff - vendor/backtrace-sys/src/libbacktrace/mmap.c
New upstream version 1.44.1+dfsg1
[rustc.git] / vendor / backtrace-sys / src / libbacktrace / mmap.c
index 32fcba6239927f19ed36f0f2a4fec63a92457e77..dd7d519cc56c7778b7693a26f8e9f000575ec64f 100644 (file)
@@ -1,5 +1,5 @@
 /* mmap.c -- Memory allocation with mmap.
-   Copyright (C) 2012-2018 Free Software Foundation, Inc.
+   Copyright (C) 2012-2020 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Google.
 
 Redistribution and use in source and binary forms, with or without
@@ -321,5 +321,7 @@ backtrace_vector_release (struct backtrace_state *state,
   backtrace_free (state, (char *) vec->base + aligned, alc,
                  error_callback, data);
   vec->alc = 0;
+  if (vec->size == 0)
+    vec->base = NULL;
   return 1;
 }