OSDN Git Service

This patch removes a use of uninitialized memory in lmgr/lock.c, by
authorBruce Momjian <bruce@momjian.us>
Thu, 26 Sep 2002 05:18:30 +0000 (05:18 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 26 Sep 2002 05:18:30 +0000 (05:18 +0000)
adding a missing sprintf().

Neil Conway

src/backend/storage/lmgr/lock.c

index 03d16d6..3a26027 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.115 2002/09/04 20:31:25 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.116 2002/09/26 05:18:30 momjian Exp $
  *
  * NOTES
  *       Outside modules can create a lock table and acquire/release
@@ -256,6 +256,7 @@ LockMethodTableInit(char *tabName,
        shmemName = (char *) palloc(strlen(tabName) + 32);
 
        /* each lock table has a non-shared, permanent header */
+       sprintf(shmemName, "%s (lock method table)", tabName);
        lockMethodTable = (LOCKMETHODTABLE *)
                ShmemInitStruct(shmemName, sizeof(LOCKMETHODTABLE), &found);