Browse code

initialise refcount in cli_loadmd()

git-svn: trunk@1454

Tomasz Kojm authored on 2005/04/06 23:13:09
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Wed Apr  6 16:11:50 CEST 2005 (tk)
2
+----------------------------------
3
+  * libclamav/readdb.c: initialise refcount in cli_loadmd()
4
+
1 5
 Tue Apr  5 14:27:32 BST 2005 (trog)
2 6
 -----------------------------------
3 7
   * libclamav/vba_extract.c: fix possible crash
... ...
@@ -725,6 +725,7 @@ static int cli_loadmd(FILE *fd, struct cl_node **root, unsigned int *signo, int
725 725
 	*root = (struct cl_node *) cli_calloc(1, sizeof(struct cl_node));
726 726
 	if(!*root)
727 727
 	    return CL_EMEM;
728
+	(*root)->refcount = 1;
728 729
     }
729 730
 
730 731
     while(fgets(buffer, FILEBUFF, fd)) {