heavyrain2012 4 years ago
parent
commit
7d3d94d3ff

+ 1 - 0
wfclient/WFChatClient/amr/wav_amr.mm

@@ -96,6 +96,7 @@ int encode_amr(const char* infile, const char* outfile) {
     amr = Encoder_Interface_init(0);
     out = fopen(outfile, "wb");
     if (!out) {
+        free(inputBuf);
         perror(outfile);
         return 1;
     }

+ 3 - 0
wfuikit/WFChatUIKit/Category/AttributedLabel.m

@@ -179,6 +179,7 @@
     CTFrameRef frame = CTFramesetterCreateFrame(framesetter, CFRangeMake(0, [self.attributedText length]), path, NULL);
     
     if (frame == NULL) {
+        CFRelease(framesetter);
         CFRelease(path);
         return NSNotFound;
     }
@@ -190,6 +191,7 @@
     //NSLog(@"num lines: %d", numberOfLines);
     
     if (numberOfLines == 0) {
+        CFRelease(framesetter);
         CFRelease(frame);
         CFRelease(path);
         return NSNotFound;
@@ -231,6 +233,7 @@
         }
     }
     
+    CFRelease(framesetter);
     CFRelease(frame);
     CFRelease(path);
     

+ 1 - 0
wfuikit/WFChatUIKit/Vendor/DNImagePicker/Controllers/DNImageFlowViewController.m

@@ -76,6 +76,7 @@ static NSString* const dnAssetsViewCellReuseIdentifier = @"DNAssetsViewCell";
 }
 
 - (void)viewWillDisappear:(BOOL)animated {
+    [super viewWillDisappear:animated];
     self.navigationController.toolbarHidden = YES;
     [[NSNotificationCenter defaultCenter] removeObserver:self];
 }