소스 검색

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 년 전
부모
커밋
26ef098df7
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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 );
 }