Kaynağa Gözat

Bug 616500 - fix coverify Defect Type: Resource leaks issues CID 12094 - 12136

https://bugzilla.redhat.com/show_bug.cgi?id=616500
Resolves: bug 616500
Bug description: fix coverify Defect Type: Resource leaks issues CID 12133, 12134
description: Fixed resource leaks in helpJavaScriptForTopic() and helpJavaScript().
Endi S. Dewata 15 yıl önce
ebeveyn
işleme
26ef098df7
1 değiştirilmiş dosya ile 2 ekleme ve 0 silme
  1. 2 0
      lib/libadmin/template.c

+ 2 - 0
lib/libadmin/template.c

@@ -80,6 +80,7 @@ NSAPI_PUBLIC char *helpJavaScriptForTopic( char *topic )
 		   getenv("SERVER_URL"), server, topic,
 		   type );
 		   
+    FREE(type);
     return(STRDUP(line));
 }
 
@@ -93,5 +94,6 @@ NSAPI_PUBLIC char *helpJavaScript()
     sn=strrchr(tmp, '/');
     if( sn )
         *sn++='\0';
+    FREE(tmp);
     return helpJavaScriptForTopic( sn );
 }